Skip to content

Instantly share code, notes, and snippets.

@elliotkim916
Created June 11, 2018 22:09
Show Gist options
  • Save elliotkim916/51796dee1549c5db4a0c81b62fc33f2f to your computer and use it in GitHub Desktop.
Save elliotkim916/51796dee1549c5db4a0c81b62fc33f2f to your computer and use it in GitHub Desktop.
Big O Drills
Even or odd = Constant Run Time Complexity 0(1)
Are you here? = Polynomial Run Time Complexity 0(n^k)
Doubler = Linear Run Time Complexity 0(n)
Naive Search = Linear Run Time Complexity 0(n)
Creating pairs = Polynomial Run Time Complexity 0(n^k)
Computing fibonaccis = Linear Run Time Complexity 0(n)
An Efficient Search = Logarithmic Run Time Complexity 0(log(n))
Random element = Constant Run Time Complexity 0(1)
Is it prime? = Linear Run Time Complexity 0(n)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment