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

algorithm/js/sort.js #1

Open
Lianstu opened this issue May 25, 2018 · 1 comment
Open

algorithm/js/sort.js #1

Lianstu opened this issue May 25, 2018 · 1 comment

Comments

@Lianstu
Copy link

Lianstu commented May 25, 2018

快排:空间复杂度上不需要再增加两个辅助数组;他的用到栈,空间复杂度是栈的使用次数就是递归次数,多出来的两个辅助数组浪费了;
这个版本像是尤雨溪老师的那个,只是去掉了splice()这个循环的js内部方法

@qieguo2016
Copy link
Owner

有原地快排的版本。这个快排只是作为演示,没有考虑算法的稳定性。

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

2 participants