1.

In binary tree sort, we first construct the BST and then we perform _______ traversal to get the sorted order.(a) inorder(b) postorder(c) preorder(d) level orderThis question was addressed to me by my college director while I was bunking the class.My query is from Sorting topic in portion Sorting of Data Structures & Algorithms II

Answer»

The CORRECT OPTION is (a) inorder

To explain: In binary tree SORT is a sort ALGORITHM where a binary search tree is built from the elements to be sorted, and then we perform inorder traversal on the BST to GET the elements in sorted order.



Discussion

No Comment Found

Related InterviewSolutions