Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sharihobbs/908745a22c9568e8f339c9788a82debc to your computer and use it in GitHub Desktop.
Save sharihobbs/908745a22c9568e8f339c9788a82debc to your computer and use it in GitHub Desktop.
Big O Drills
Even or odd is O(1).
Are you here? is O(n^k).
Doubler is O(n).
Naive Search is O(n).
Creating pairs is O(n^2).
Computing fibonaccis is O(n).
An Efficient Search is O(log(n)).
Random element is O(1).
Is it prime? is O(n).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment