Created
September 20, 2017 19:09
-
-
Save shirts/7a51c5fd4990d780da419cdcd103ee82 to your computer and use it in GitHub Desktop.
BIG O
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
O(1) = Immediately know exactly which element to visit (array by index, hash table lookup) | |
O(n) = Visit element once (find something in a list of unique values) | |
O(log n) = Loop the whole list multiple times but reduce its size each iteration roughly by half (sorting algorithms like quick sort [or is it merge sort]?) | |
O(n^2) = Loop the whole list for each element in the list (nested loops) (edited) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment