The following sequence of operation is performed on stack : push(1),push(2),pop,push(1),push(2),pop,pop,pop,push(2),pop. The sequence of popped out values are ?
Abdelrahman S. Fathy from Cairo, Egypt is saying 2,2,1,1,2 is correct answer
Sanju Rebel from Hyderabad, India is saying 2,2,1,2,2 is correct answer
esraa nashat from Cairo, Egypt is saying 2,2,1,1,2 is correct answer
Serkie Mekonnen from Dessie, Ethiopia is saying 2,1,2,2,1 is correct answer
Marem Husen from Al Musayyib, Iraq is saying 2,1,2,2,1 is correct answer
- [A] Optimal binary search tree construction can be performed efficiently using dynamic programming.
- [B] Breath first search cannot be used to find converted components of a graph.
- [C] Given the prefix and post fix walks over a binary tree.The binary tree cannot be uniquely constructe
- [D] Depth first search can be used to find connected components of a graph.
- [A] Dynamic programming
- [B] Backtracking
- [C] Divide and conquer
- [D] Greedy method
- [A] Stack
- [B] Set
- [C] List
- [D] Queue