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

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. Returntop
 
Answer: C
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.
 

Tìm kiếm

Back
Top