Professional KnowledgeHardIBPS SO IT
A stack permutation: pushes 1, 2, 3, 4 in order. Which output sequence is impossible?
- A. 2, 1, 4, 3
- B. 3, 1, 2, 4
- C. 1, 2, 3, 4
- D. 4, 3, 2, 1
Correct answer: B. 3, 1, 2, 4
To output 3 first, 1 and 2 are on the stack with 2 on top, so 2 must come before 1.
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
- The time complexity of inserting at the head of a singly linked list is:
- Time to build a BST from n keys already sorted in ascending order by successive insertion is:
- 0/1 knapsack with capacity W and n items by dynamic programming has complexity:
- Edit distance between kitten and sitting is:
- Which problem is NP-complete?
- Regular expression (a+b)abb corresponds to a DFA over {a,b} with the minimum number of states equal to: