Reading a binary search tree from left to right gives the elements in:
AInsertion order
BSorted order
CRandom order
DReverse order
Answer & Solution
Correct answer: B. Sorted order
1. The search property puts smaller values first.
2. An in order walk visits them in that sequence.
3. So they come out in sorted order.
_Source: OpenStax Introduction to Computer Science, Chapter 3, Data Structures and Algorithms._
Keep practising Data Structures and Algorithms
Browse all Data Structures and Algorithms questions for Coding Interview Prep, or explore more Computer Science topics.