Given an undirected tree with N nodes (N < 1000), calculate the maximum height (longest path from the root to a leaf) for every node if that node were chosen as the root.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.