Binary Trees and Traversals - Complexity Analysis - Competitive Exam Level

Download Q&A
Q. What is the time complexity of inserting an element into a binary search tree in the average case?
  • A. O(n)
  • B. O(log n)
  • C. O(n log n)
  • D. O(1)
Q. What is the time complexity of level-order traversal of a binary tree?
  • A. O(n)
  • B. O(log n)
  • C. O(n log n)
  • D. O(1)
Q. Which of the following is true about the height of a binary tree with n nodes?
  • A. Height = n
  • B. Height = log n
  • C. Height <= n
  • D. Height = n/2
Q. Which of the following traversal methods can be implemented using a stack?
  • A. In-order
  • B. Pre-order
  • C. Post-order
  • D. All of the above
Q. Which of the following traversal methods can be used to obtain a sorted order of elements in a binary search tree?
  • A. Pre-order
  • B. Post-order
  • C. In-order
  • D. Level-order
Q. Which traversal method of a binary tree will give the nodes in non-decreasing order?
  • A. Pre-order
  • B. Post-order
  • C. In-order
  • D. Level-order
Showing 1 to 6 of 6 (1 Pages)
Soulshift Feedback ×

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

Not likely Very likely