0% completed
Unclear as to what the implementation expectations are for the Queues in the problem set
odhran.19
Mar 5, 2024
I want some clarity on what implementation of a Queue we should expect to see in the problem set. In the first problem the queue is implemented as a list, in Python.
It was not clear that the front of the 'queue' should be the 0 index of the list?
Why show a Queue that uses Node and .next, .enqueue, .dequeue functions if these are not used?
In a real interview leetcode/hackerrank/coderpad what approach should we use?
6
0
Comments
Rafael Emericka year ago
You dont need stack to solve first problem. You can just swap elements using only one for loop. In interview just use array or list (if python/ts/js) in queue problems.
Daven La year ago
I agree that the first problem (Reverse a queue) should be updated to reflect the expected implementation of a queue for this question. A learner would have just went through a linked list implementation, so it would have been reasonable to expect to be able to use queu...
On this page