UGC NET Paper 2 (Computer Science)Hard

The amortized time complexity of an operation (search, insert or delete) on a splay tree with n nodes is:

  1. A. O(log n)
  2. B. O(n)
  3. C. O(1)
  4. D. O(log^2 n)

Correct answer: A. O(log n)

Splaying moves the accessed node to the root via rotations; a potential-function argument shows this costs O(log n) amortized, even though a single operation can take O(n) in the worst case.

More UGC NET Computer Science and Applications questions

Exams that ask this topic