Skip to content
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

队列的性能问题 #5

Open
tiansh opened this issue Aug 1, 2017 · 0 comments
Open

队列的性能问题 #5

tiansh opened this issue Aug 1, 2017 · 0 comments

Comments

@tiansh
Copy link

tiansh commented Aug 1, 2017

queue.md 中给出的队列实现中,出队操作在大多数 JS 引擎下是 O(n) 时间复杂度的。而正常的实现应该可以做到 O(1) 或至少均摊 O(1) 的复杂度。

建议把修改这一节的实现;或说明其中的实现仅为数据结构示例,不建议直接使用。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant