还是抓紧抄底吧,别做梦了。# Stock
m*n
1 楼
When should you use an O(N^2) algorithm over an O(N) algorithm?
这道题很奇怪,和正常想法反着来的。
想到的是以下几点:
1. when time complexity is not critical,and space complexity is more
important while O(n^2) algorithm has better space complexity.
2. when time complexity is not critical,bug free coding for O(n^2) is much
easier and faster than O(n).
3. when n is always finite and can never be very large.
还有什么可以说的?
这道题很奇怪,和正常想法反着来的。
想到的是以下几点:
1. when time complexity is not critical,and space complexity is more
important while O(n^2) algorithm has better space complexity.
2. when time complexity is not critical,bug free coding for O(n^2) is much
easier and faster than O(n).
3. when n is always finite and can never be very large.
还有什么可以说的?