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:
- A. O(log n)
- B. O(n)
- C. O(1)
- 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.
Practise more UGC NET Computer Science and Applications questionsUGC NET Computer Science and Applications: notes and key points
More UGC NET Computer Science and Applications questions
- The minimum number of states in a DFA over {0, 1} accepting exactly the strings that end with 00 is:
- Which statement about pushdown automata acceptance modes is correct?
- Given a grammar in Chomsky Normal Form, the CYK algorithm decides whether a string of length n belongs to the language in time:
- Which of the following problems is undecidable in general?
- The four networks 10.0.4.0/24, 10.0.5.0/24, 10.0.6.0/24 and 10.0.7.0/24 can be aggregated (route-summarised) into:
- On receiving three duplicate ACKs, TCP Reno performs: