Binary Trees and Traversals - Advanced Concepts

Download Q&A
Q. How many leaf nodes does a full binary tree with 'n' internal nodes have?
  • A. n
  • B. n + 1
  • C. 2n
  • D. n/2
Q. What is the maximum depth of a binary tree with 'n' nodes?
  • A. n
  • B. log n
  • C. n/2
  • D. n - 1
Q. What is the primary advantage of using a binary tree over an array for dynamic data storage?
  • A. Faster access
  • B. Dynamic size
  • C. Less memory usage
  • D. Easier sorting
Q. What is the result of a post-order traversal of a binary tree?
  • A. Root, Left, Right
  • B. Left, Right, Root
  • C. Right, Left, Root
  • D. Left, Root, Right
Q. What is the space complexity of a recursive in-order traversal of a binary tree?
  • A. O(n)
  • B. O(log n)
  • C. O(1)
  • D. O(n log n)
Q. What is the time complexity of finding the height of a binary tree?
  • A. O(n)
  • B. O(log n)
  • C. O(n log n)
  • D. O(1)
Q. What is the worst-case time complexity of searching for an element in a binary search tree?
  • A. O(n)
  • B. O(log n)
  • C. O(n log n)
  • D. O(1)
Q. Which traversal method is best for copying a binary tree?
  • A. Pre-order
  • B. In-order
  • C. Post-order
  • D. Level-order
Q. Which traversal method would you use to get the nodes of a binary tree in non-decreasing order?
  • A. Pre-order
  • B. In-order
  • C. Post-order
  • D. Level-order
Q. Which traversal technique is best suited for printing the nodes of a binary tree level by level?
  • A. Pre-order
  • B. In-order
  • C. Post-order
  • D. Level-order
Showing 1 to 10 of 10 (1 Pages)
Soulshift Feedback ×

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

Not likely Very likely