You are given an array of distinct integers. Inserting the elements in order into an empty binary search tree produces a particular BST. For example, [5, 6, 1] gives root 5, right child 6 and left…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.