-
Notifications
You must be signed in to change notification settings - Fork 84
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
选择排序 #184
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
算法名称
选择排序
实现思路
算法分析
总共需要进行length * (length - 1) / 2 次比较,所以时间复杂度为O(n^2),因为只需要有两个存放常量的空间,元素本身在原数组上进行交换,所以空间复杂度为O(1)
算法实现
The text was updated successfully, but these errors were encountered: