All mock tests are FREE till 31 December — register to save your progress
Unit 7 · Data Structures and Algorithms Paper 2 CS · December 2024

Considering the binary tree shown (A has children B and C; C has children D and E; E has right child F; F has children G and H), what will be the inorder traversal?

Figure

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: A. BADCEGFH

Explanation

Inorder = left, root, right: B, A, then C's subtree: D, C, E's subtree (E, then F's subtree G, F, H). Result: B A D C E G F H.

More Data Structures and Algorithms questions