Binary Trees and Traversals - Applications

Download Q&A
Q. In which traversal method are nodes visited in ascending order for a binary search tree?
  • A. Pre-order
  • B. In-order
  • C. Post-order
  • D. Level-order
Q. In which traversal method are nodes visited level by level?
  • A. In-order
  • B. Post-order
  • C. Pre-order
  • D. Level-order
Q. What is the primary application of level-order traversal in binary trees?
  • A. Finding the height of the tree
  • B. Finding the maximum element
  • C. Printing nodes level by level
  • D. Sorting the elements
Q. What is the result of an in-order traversal of a binary search tree?
  • A. Nodes in random order
  • B. Nodes in descending order
  • C. Nodes in ascending order
  • D. Nodes in level order
Q. What is the space complexity of a recursive binary tree traversal?
  • A. O(1)
  • B. O(n)
  • C. O(log n)
  • D. O(n^2)
Q. What is the worst-case time complexity for inserting an element in a binary search tree?
  • A. O(log n)
  • B. O(n)
  • C. O(n log n)
  • D. O(1)
Q. What is the worst-case time complexity for inserting an element in an unbalanced binary tree?
  • A. O(log n)
  • B. O(n)
  • C. O(n log n)
  • D. O(1)
Q. Which data structure is used to implement depth-first search in a binary tree?
  • A. Queue
  • B. Stack
  • C. Array
  • D. Linked List
Q. Which of the following is NOT a property of a binary search tree?
  • A. Left child < parent
  • B. Right child > parent
  • C. All nodes are unique
  • D. All nodes are at the same level
Q. Which traversal method is best for creating a mirror image of a binary tree?
  • A. In-order
  • B. Post-order
  • C. Pre-order
  • D. Level-order
Q. Which traversal method visits the root node before its children?
  • A. In-order
  • B. Post-order
  • C. Pre-order
  • D. Level-order
Showing 1 to 11 of 11 (1 Pages)
Soulshift Feedback ×

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

Not likely Very likely