1.

Given only a single array of size 10 and no other memory is available. Which of the following operation is not feasible to implement (Given only push and pop operation)?(a) Push(b) Pop(c) Enqueue(d) ReturntopQuery is from Queue using Stacks topic in portion Abstract Data Types of Data Structures & Algorithms II have been asked this question in an interview for internship.

Answer» RIGHT choice is (c) Enqueue

The best explanation: To perform Enqueue using just push and pop OPERATIONS, there is a NEED of another ARRAY of same size. But as there is no extra available memeory, the given operation is not feasible.


Discussion

No Comment Found

Related InterviewSolutions