The inorder traversal of which data structure is always in sorted order?
-
AVL tree
-
Min-max heap
-
Binary search tree
-
Unrooted binary tree
-
Random binary tree
C
Correct answer
Explanation
A binary search tree (BST), sometimes also called an ordered or sorted binary tree, is a node-based binary tree data structure.The major advantage of binary search trees over other data structures is that the related sorting algorithms and search algorithms such as inorder traversal can be very efficient.