Tree Traversals Quiz 1

Placewit
Jun 13, 2021

--

What is common in three different types of traversals (Inorder, Preorder and Postorder) ?

A. Root is visited before right subtree

B. Left subtree is always visited before right subtree

C. Root is visited after left subtree

D. All of the above

Solution :

B) is correct.

The order of inorder traversal is LEFT ROOT RIGHT The order of preorder traversal is ROOT LEFT RIGHT The order of postorder traversal is LEFT RIGHT ROOT In all three traversals, LEFT is traversed before RIGHT

Thanks for Reading

Placewit grows the best engineers by providing an interactive classroom experience and by helping them develop their skills and get placed in amazing companies.

Learn more at Placewit. Follow us on Instagram and Facebook for daily learning.

--

--

Placewit
Placewit

Written by Placewit

Upskilling students for tech placements!

No responses yet