Company: Swiggy_8_jan
Difficulty: medium
Recursive Land Division body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; line-height: 1.6; color: #333; max-width: 800px; margin: 20px auto; padding: 0 20px; } h1, h2, h3 { border-bottom: 1px solid #eee; padding-bottom: 10px; } h1 { font-size: 2em; } h2 { font-size: 1.5em; } h3 { font-size: 1.2em; } code { background-color: #f6f8fa; border-radius: 3px; font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; padding: 0.2em 0.4em; font-size: 85%; } pre { background-color: #f6f8fa; border-radius: 3px; padding: 16px; overflow: auto; } pre code { padding: 0; font-size: 100%; } ul { padding-left: 20px; } Recursive Land Division Problem Description A country consists of N regions, each containing a specific number of towns. The government has decided to split the country into two separate nations in a way that minimizes the absolute difference between the total nu