Tree Traversals Advanced

Download Q&A
Q. In a level-order traversal, which data structure is typically used to keep track of nodes?
  • A. Stack
  • B. Queue
  • C. Array
  • D. Linked List
Q. What is the main difference between depth-first and breadth-first traversal?
  • A. Order of node visits
  • B. Data structure used
  • C. Time complexity
  • D. Space complexity
Q. What is the time complexity of an in-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 NOT a valid tree traversal method?
  • A. In-order
  • B. Pre-order
  • C. Post-order
  • D. Side-order
Q. Which traversal would you use to delete a binary tree?
  • A. In-order
  • B. Pre-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