Difference between revisions of "Comparing Algorithms - Big O"
Line 1: | Line 1: | ||
Big O Notation is a measure of how long or how much memory is needed to execute and algorithm. This uses the worst case scenario, so that you get the maximum time and memory usage. It uses n as the number of items. | Big O Notation is a measure of how long or how much memory is needed to execute and algorithm. This uses the worst case scenario, so that you get the maximum time and memory usage. It uses n as the number of items. | ||
− | + | === Time complexities: === | |
===== Constant complexity - O(1)===== | ===== Constant complexity - O(1)===== | ||
===== Linear complexity - O(n)===== | ===== Linear complexity - O(n)===== |
Revision as of 11:02, 15 May 2017
Big O Notation is a measure of how long or how much memory is needed to execute and algorithm. This uses the worst case scenario, so that you get the maximum time and memory usage. It uses n as the number of items.