1. Home
  2. Computer Science MCQs
  3. Algorithms and Data Structures
  4. Number of rotations needed to convert a BST into a…

Added 14 Sep 2025

Number of rotations needed to convert a BST into a perfectly balanced BST?

  1. O(log n)
  2. O(n) Correct answer
  3. O(n log n)
  4. O(1)

Correct answer

B. O(n)

15 views

MCQSEXAM

Explanation

At most O(n) left/right rotations suffice.

Reference

https://cs.stackexchange.com/questions/12354

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Algorithms and Data Structures MCQs

Practise all Algorithms and Data Structures MCQs

Similar MCQs