Balanced Trees: AVL and Red-Black Trees - Implementations in Python

Download Q&A
Q. In a Red-Black tree, what happens when a red node is inserted as a child of another red node?
  • A. The tree remains valid.
  • B. The tree is immediately balanced.
  • C. A recoloring and rotation may be needed.
  • D. The insertion is not allowed.
Q. What is the time complexity of searching for a value in a Red-Black tree?
  • A. O(n)
  • B. O(log n)
  • C. O(n log n)
  • D. O(1)
Showing 1 to 2 of 2 (1 Pages)
Soulshift Feedback ×

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

Not likely Very likely