Professional KnowledgeHardIBPS SO IT
Preorder of a BST is 50, 30, 20, 40, 70, 60, 80. Its postorder is:
- A. 20, 30, 40, 50, 60, 70, 80
- B. 20, 40, 30, 60, 80, 70, 50
- C. 40, 20, 30, 80, 60, 70, 50
- D. 20, 40, 60, 80, 30, 70, 50
Correct answer: B. 20, 40, 30, 60, 80, 70, 50
Root 50, left subtree 30(20,40), right subtree 70(60,80); postorder lists left, right, 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
- Inserting 10, 20, 30, 40, 50, 25 in an AVL tree, the root of the final tree is:
- 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?