Q) You are given a root-less tree (which can also be thought of as an undirected acyclic connected graph). The problem is to choose one of the nodes from the tree as root such that the height of the resultant tree is minimum.
Device an appropriate data-structure and write a program for the same. mum height possible is 2. So for this example the code should return the node '3'. Note: All nodes are numbered from 1 to n, where 'n' is the number of nodes. Incase there are more than one roots possible, then your program can return any one of them. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---