Algorithms 1 - BSc Computer Science (Semester 1) - Goldsmith, University of London
Big O Notations is a way to represent how long an algorithm will take to execute. It is used to
enable a Software Engineer to determine how efficient different approaches to solving
problems are. There are 4 main common types of time complexities in Big O Notation: -
● O(1) - Constant time complexity
● O (n) - Linear time complexity
● O(log n) - Logarithmic time complexity
● O(n ^ 2) - Quadratic time complexity
O(1) CONSTANT TIME COMPLEXITY:
Constant time algorithms will always take the same amount of time to be executed. The
execution time of these algorithms is independent of the size of the input. A effective
example of O(1) time is accessing a value with an array index.
E.g Push() or pop() operations on an array.
Big O Notations is a way to represent how long an algorithm will take to execute. It is used to
enable a Software Engineer to determine how efficient different approaches to solving
problems are. There are 4 main common types of time complexities in Big O Notation: -
● O(1) - Constant time complexity
● O (n) - Linear time complexity
● O(log n) - Logarithmic time complexity
● O(n ^ 2) - Quadratic time complexity
O(1) CONSTANT TIME COMPLEXITY:
Constant time algorithms will always take the same amount of time to be executed. The
execution time of these algorithms is independent of the size of the input. A effective
example of O(1) time is accessing a value with an array index.
E.g Push() or pop() operations on an array.