Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/play3rzer0/bigo
BigO Notation Examples
https://github.com/play3rzer0/bigo
algorithms basic-programming big-o bubble-sort computer-science linear-search python time-complexity
Last synced: about 2 hours ago
JSON representation
BigO Notation Examples
- Host: GitHub
- URL: https://github.com/play3rzer0/bigo
- Owner: Play3rZer0
- Created: 2019-04-29T06:18:15.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-05-02T10:21:05.000Z (over 5 years ago)
- Last Synced: 2024-07-11T14:25:36.991Z (4 months ago)
- Topics: algorithms, basic-programming, big-o, bubble-sort, computer-science, linear-search, python, time-complexity
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BigO
The following are examples used in the Big O article.
All these examples require Python 2.7 and Higher in order to work properly.
The following examples are:
1. Binary Search (binary.py)
2. Bubblesort (bubblesort.py)
3. Constant (constant.py)
4. Linear Search (linear.py)O(1) is constant, no matter how many elements are added the resulting operation will always be the same time.
O(N) is linear, it increases operations as the number of elements increases in direct proportion.
O(Log N) is logarithmic or half of linear time, it halves the number of operations required given the same elements as O(n).
O(N²) shows the worst case scenario as operations increase steeply with the increase in number of elements, or quadratic time.