# Let T be a binary search tree (not necessarily balanced).Suggest an algorithm that in time O(n)…

Let T be a binary search tree (not necessarily balanced).Suggest an algorithm that in time O(n) construct a new T 0containing the same keys, such that a search time in T 0 with thefollowing property. During find(x) operation in T 0 , we visit ≤ 1+ log2 n nodes of T 0 . Note showing only O(log n) is notsufficient.