Binary Trees and Traversals - Applications - Competitive Exam Level

Download Q&A
Q. In a binary tree, what is the in-order traversal of the tree with root 1, left child 2, and right child 3?
  • A. 1, 2, 3
  • B. 2, 1, 3
  • C. 3, 1, 2
  • D. 1, 3, 2
Q. What is the post-order traversal of a binary tree with root 1, left child 2, and right child 3?
  • A. 1, 2, 3
  • B. 2, 3, 1
  • C. 2, 1, 3
  • D. 3, 2, 1
Q. What is the space complexity of a recursive preorder traversal of a binary tree?
  • A. O(1)
  • B. O(n)
  • C. O(h)
  • D. O(n log n)
Q. What is the worst-case time complexity of inserting an element in a binary search tree?
  • A. O(log n)
  • B. O(n)
  • C. O(n log n)
  • D. O(1)
Q. Which traversal method is 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 5 of 5 (1 Pages)
Soulshift Feedback ×

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

Not likely Very likely