Skip to content

Commit

Permalink
Merge pull request kodecocodes#849 from amichnia/refine/comb-sort-tim…
Browse files Browse the repository at this point in the history
…e-cmoplexity

Fixed error in description
  • Loading branch information
richard-ash authored Jan 3, 2019
2 parents f7c5ec7 + 1f15eda commit 9265eba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Comb Sort/README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ This will sort the values of the array into ascending order -- increasing in val
## Performance

Comb Sort was created to improve upon the worst case time complexity of Bubble Sort. With Comb
Sort, the worst case scenario for performance is exponential -- O(n^2). At best though, Comb Sort
performs at O(n logn) time complexity. This creates a drastic improvement over Bubble Sort's performance.
Sort, the worst case scenario for performance is polynomial -- O(n^2). At best though, Comb Sort
performs at O(n logn) time complexity -- loglinear. This creates a drastic improvement over Bubble Sort's performance.

Similar to Bubble Sort, the space complexity for Comb Sort is constant -- O(1).
This is extremely space efficient as it sorts the array in place.
Expand Down

0 comments on commit 9265eba

Please sign in to comment.