HackerRank Kingdom Division Problem Solution
In this post, we will solve HackerRank Kingdom Division Problem Solution. King Arthur has a large kingdom that can be represented as a tree, where nodes correspond to cities and edges correspond to the roads between cities. The kingdom has a total of n cities numbered from 1 to n. The King wants to divide his kingdom between his two children,…