Binary Trees and Traversals - Implementations in C++ - Competitive Exam Level

Download Q&A
Q. What is the output of the following C++ code for a binary tree with root value 1, left child 2, and right child 3 during pre-order traversal?
  • A. 1 2 3
  • B. 2 1 3
  • C. 1 3 2
  • D. 3 2 1
Q. Which of the following traversal methods can be used to print the nodes of a binary tree level by level?
  • A. In-order
  • B. Pre-order
  • C. Post-order
  • D. Level-order
Showing 1 to 2 of 2 (1 Pages)
Soulshift Feedback ×

On a scale of 0–10, how likely are you to recommend The Soulshift Academy?

Not likely Very likely