-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
In Queue the dequeue
should be O(1) complexity
#942
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Dequeue on queue works on a O(n) complexity. https://github.com/ayDavidGitHere/Javascript/tree/master/Data-Structures/Linked-List |
Yeah, I see. |
The queue should be implemented using linked lists. The current implementation is clearly suboptimal for no good reason. |
@fahimfaisaal Are you working on this issue? |
Yep.. I'll send pr soon. |
@fahimfaisaal You still haven't sent a pull request. Are you working on this, or should I put this issue up for grabs? |
@raklaptudirm I apologize for my latency. |
#1005 fixes this. |
From this Queue implementation I believe the Operation is O(n) cause the complexity of
Array.prototype.shift
methods is O(n), seeThe text was updated successfully, but these errors were encountered: