DEV Community

Discussion on: Writing a queue in JS (using an Array)

Collapse
 
scarvps profile image
ScaRvps •

If you want O(1) for removal, you need to implement the queue using linked list rather than array.

Collapse
 
petrussola profile image
Pere Sola •

Thanks! You prompted me to build a Queue using a LL, check it out at dev.to/petrussola/writing-a-queue-... and let me know if you spot any mistakes