Skip to content

Instantly share code, notes, and snippets.

@nthState
Created January 25, 2018 21:11
Show Gist options
  • Save nthState/417d89704baf4b4b8a3b9d43028761ac to your computer and use it in GitHub Desktop.
Save nthState/417d89704baf4b4b8a3b9d43028761ac to your computer and use it in GitHub Desktop.
Time complexity
O(1) - dictionary lookup
O(n) - linear, 100 items = 1 second, 200 = 2 seconds
O(n2) - nested
O(2n) - exponential
O(logN) - binary search, binary tree
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment