-
Notifications
You must be signed in to change notification settings - Fork 17
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
快速排序 #2
Labels
Comments
不觉得图有点不对吗 |
var length = array.length; |
@zhilidali 好的,我改正下 |
@zhilidali 图已改正 |
没有java的吗 |
@zhuzhushang 没有,我不熟悉java |
楼主这头像。。。我喜欢。。 |
@clone123 大兄弟不搞基 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
快速排序
步骤
方法一
实现一个quickSort的封装,并且定义left和right,找到数组的基准点baseDot和对应的基数base,然后遍历数组的每一项和base进行对比,最后递归调用,给出一个跳出条件
if (arr.length <= 1) {return arr;}
方法二
快速排序的基本思想就是分治法
The text was updated successfully, but these errors were encountered: