Binary Trees and Traversals - Implementations in C++ - Higher Difficulty Problems

Download Q&A
Q. If a binary tree is balanced, what is the maximum height of the tree in terms of the number of nodes 'n'?
  • A. O(n)
  • B. O(log n)
  • C. O(n log n)
  • D. O(1)
Q. In a binary tree, what is the height of a tree with only one node?
  • A. 0
  • B. 1
  • C. 2
  • D. Undefined
Q. What is the post-order traversal sequence of a binary tree with root 1, left child 2, and right child 3?
  • A. 1, 2, 3
  • B. 2, 3, 1
  • C. 3, 2, 1
  • D. 1, 3, 2
Q. What is the result of a level-order traversal on a binary tree with root 1, left child 2, and right child 3?
  • A. 1, 2, 3
  • B. 2, 1, 3
  • C. 1, 3, 2
  • D. 3, 2, 1
Q. Which of the following statements about binary trees is true?
  • A. A binary tree can have at most two children per node.
  • B. A binary tree must be balanced.
  • C. A binary tree can only have integer values.
  • D. A binary tree cannot be empty.
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