fix: Unnecessary parameter in Queue class methods
kevinweejh opened this issue · 2 comments
Hello maintainers/contributors,
While going through the JavaScript Data Structures - Queue page, I found a couple of oversights in the markdown content, specifically in the file located at content/snippets/js/s/data-structures-queue.md.
On lines 38 and 42, the implementation of the dequeue()
and peek()
methods do not use the item
parameter. This is because unlike a priority queue, a typical FIFO-based queue will dequeue strictly from the start of the queue, same with the peeking method.
To fix this, the item
parameter needs to be removed from both the dequeue()
and peek()
methods in lines 38 and 42 respectively.
I have searched through the open issues and found no duplicates of this issue. As such, may I work on this issue?
Once again, thank you for maintaining this resource! Let me know if I should go ahead and create a PR to fix this oversight.
Thanks for reporting this, @kevinweejh. You are indeed correct that item
is unused and unnecessary in both methods. Feel free to open a Pull Request with the relevant fix, I'm assigning the issue to you! 😉
Thank you for assigning this to me @Chalarangelo
I'll work on it and submit a PR shortly.