mirror of
https://github.com/onyx-and-iris/grokking-algorithms.git
synced 2026-04-16 11:33:34 +00:00
clean up repo.
add more notes
This commit is contained in:
7
chapter2/README.md
Normal file
7
chapter2/README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Selection Sort
|
||||
|
||||
We have to perform N swaps a total of N times. This takes N^N steps, therefore:
|
||||
|
||||
This algorithm has time complexity `O(N^2)`
|
||||
|
||||
Technically (`n – 1, n - 2 ... 2, 1` ~= N/2) swaps are performed but in BigO the constants are dropped.
|
||||
Reference in New Issue
Block a user