Binary Trees and Traversals - Complexity Analysis - Numerical Applications

Download Q&A
Q. In a binary tree, if a node has two children, how many nodes can be at the next level?
  • A. 1
  • B. 2
  • C. 3
  • D. 4
Q. What is the space complexity of a recursive pre-order traversal of a binary tree?
  • A. O(1)
  • B. O(n)
  • C. O(log n)
  • D. O(n log n)
Q. What is the time complexity of merging two sorted binary trees?
  • A. O(n)
  • B. O(n log n)
  • C. O(log n)
  • D. O(1)
Q. Which of the following traversal methods can be used to obtain a sorted order of a binary search tree?
  • A. Pre-order
  • B. In-order
  • C. Post-order
  • D. Level-order
Q. Which traversal method of a binary tree visits nodes in the order of left child, root, right child?
  • A. Pre-order
  • B. In-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