reading-notes

401 Class 1 Reading Notes

Readings Summary: This class is about: Topic

Big O notation is a way of describing the upper bound of the time or space complexity of an algorithm, which is a measure of the amount of resources required by the algorithm as the input size grows. In other words, it’s a way of characterizing how much time or memory an algorithm needs to complete its task.

In Big O notation, the time or space complexity of an algorithm is expressed as a function of the size of the input, typically denoted as “n”. For example, if the time complexity of an algorithm is O(n), this means that the amount of time required by the algorithm is proportional to the size of the input.

The “O” in Big O notation stands for “order of magnitude”, and it represents the upper bound of the time or space complexity of an algorithm. For example, if an algorithm has a time complexity of O(n^2), this means that the time required by the algorithm is proportional to the square of the input size, and it cannot take more time than that.

The Big O notation is used to compare the efficiency of different algorithms that solve the same problem. Algorithms with a lower time or space complexity are considered to be more efficient, as they require fewer resources to complete the same task.

Overall, Big O notation is a useful tool for analyzing the time or space complexity of algorithms and understanding how the performance of an algorithm changes as the input size increases. It is a powerful way to optimize algorithms and make them more efficient.

Python names refer to values

Sources

https://robbell.io/2009/06/a-beginners-guide-to-big-o-notation https://www.codenewbie.org/basecs/8 https://www.youtube.com/watch?v=_AEJHKGk9ns https://pymotw.com/3/index.html

Things I want to know more about