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

Consider the binary tree: A is the root with left child B and right child C; C has left child D and right child E; E has right child F; F has left child G and right child H. What will be the inorder traversal?

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

Show answer & explanation

Correct answer: A. BADCEGFH

Explanation

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

More Data Structures and Algorithms questions