Skip to content

Instantly share code, notes, and snippets.

@ElenaG518
Created January 3, 2019 18:48
Show Gist options
  • Save ElenaG518/479781efa71ea105576d81cbc6b34781 to your computer and use it in GitHub Desktop.
Save ElenaG518/479781efa71ea105576d81cbc6b34781 to your computer and use it in GitHub Desktop.
Big O notation
Even or odd -- constant O(1)
Are you here? -- polynomial O(n^2)
Doubler -- linear O(n)
Naive Search -- linear O(n)
Creating pairs -- polynomial O(n^2)
Computing fibonaccis -- linear O(n)
An Efficient Search -- logarithmic O(log n)
Random element-- constant O(1)
Is it prime? -- linear O(n)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment