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

冒泡算法 #4

Closed
amusi opened this issue May 30, 2018 · 1 comment
Closed

冒泡算法 #4

amusi opened this issue May 30, 2018 · 1 comment

Comments

@amusi
Copy link

amusi commented May 30, 2018

冒泡算法介绍时,"它的思想如下。对一个数组进行 n 轮迭代,每次比较相邻两个元素",这里应该是 n-1吧,因为程序也是这样写的,所以为了统一,建议修改为n-1。

link:https://github.com/PegasusWang/python_data_structures_and_algorithms/blob/master/docs/12_%E5%9F%BA%E6%9C%AC%E6%8E%92%E5%BA%8F%E7%AE%97%E6%B3%95/basic_sort.md

@PegasusWang
Copy link
Owner

这里其实当时为了强调是 O(n),确实不太严谨。已经修改

PegasusWang pushed a commit that referenced this issue May 31, 2018
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