Given an unsorted array of numbers, construct a height-balanced Binary Search Tree (BST) from the sorted elements, and then find the diameter of the resulting tree. The diameter is the length of the…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.