Multiple choice

Consider a sorted binary insertion tree. What must be done to produce a sorted array of numbers (for printing) from the sorted binary insertion tree?

  1. Pre oder traversal

  2. Post order traversal

  3. In order traversal

  4. Top-down traversal

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

A binary search tree stores keys in sorted order relative to their nodes. An in-order traversal (Left, Root, Right) visits nodes in ascending sorted order, perfect for producing a sorted array.