What is Big O notation with example?
Big O notation is a way to describe the speed or complexity of a given algorithm.
…
Big O notation shows the number of operations.
…
Big O notation shows the number of operations.
| Big O notation | Example algorithm |
|---|---|
| O(log n) | Binary search |
| O(n) | Simple search |
| O(n * log n) | Quicksort |
| O(n2) | Selection sort |
•
Jan 31, 2020
What is the big O notation of my code?
Big O notation is used in Computer Science to describe the performance or complexity of an algorithm. Big O specifically describes the worst-case scenario, and can be used to describe the execution time required or the space used (e.g. in memory or on disk) by an algorithm.