Consider an array-based queue on which you need to perform a dequeue…
PYQ TCS NQT 2024
Consider an array-based queue on which you need to perform a dequeue operation. You can implement this either using stack operations (push and pop) or using the queue's own native operations (enqueue and dequeue) directly. Assume both approaches always return the same output. Identify the correct difference between the two approaches.
- A.
They will have different time complexities
- B.
The memory used will not be different
- C.
There are chances that output might be different
- D.
No differences
Attempted by 133 students.
Sign up free to check your answer
Sign up freeLoading lesson…

