Category Archives: Complexity

Compare complexities

O(N^10), O(N^N), O(2^N), O(N!). O(N^10) < O(2^N) < O(N!)  < O(N^N)

Posted in Complexity | Leave a comment

Beyond algorithm complexity

When will you choose an algorithm whose time complexity is O(n^2) instead of the other one whose time complexity is O(n)? 1.When n is small, O(n^2) could be smaller than O(n) or they do not differ much. 2. When time … Continue reading

Posted in Complexity | Leave a comment