Company: Nokia_7june
Difficulty: medium
Given N regions connected in a tree structure, where each region has a certain number of towns, find the minimum possible absolute difference in total towns between two parts when the tree is split by removing exactly one edge. Function Description: Complete the function minTownDifference : Parameters: int N -> Number of regions int[] towns -> Array where towns[i] represents towns in region i+1 int[][] roads -> Array of N-1 pairs representing bidirectional roads between regions Returns: int -> Minimum absolute difference in towns between two parts after removing one edge Input Format: First line: Integer N Second line: N space-separated integers (towns array) Next N-1 lines: Two integers u v representing road between regions u and v Output Format: Single integer representing the minimum possible absolute difference. Constraints 2 ≤ N ≤ 10 5 (Large number of regions) 1 ≤ towns[i] ≤ 10 4 (Each region has a significant number of towns) 1 ≤ u, v ≤ N (Valid reg