Professional KnowledgeHardIBPS SO IT
Inserting 10, 20, 30, 40, 50, 25 in an AVL tree, the root of the final tree is:
- A. 30
- B. 20
- C. 40
- D. 25
Correct answer: A. 30
After 40, 50 the tree is 20(10, 40(30, 50)); inserting 25 unbalances the root in a right-left case, and a double rotation makes 30 the root.
Practise more IT Officer Professional Knowledge (IBPS SO) questionsIT Officer Professional Knowledge (IBPS SO): notes and key points
More IT Officer Professional Knowledge (IBPS SO) questions
- Which of these is a self-balancing tree guaranteeing height O(log n) using colour bits?
- Insert keys 12, 22, 32, 42 into a hash table of size 10 with h(k) = k mod 10 and linear probing. Position of 42 is:
- Time complexity of finding the k-th smallest element in an unsorted array in the worst case using median-of-medians is:
- Recurrence T(n) = 3T(n/2) + n solves to:
- Which sorting algorithm has O(n log n) worst case and is not stable?
- Which algorithm design technique does Dijkstra's single-source shortest path use?