As programmers, we often find ourselves asking the same two questions over and over again:
To put it in other words, in computer programming, there are often multiple ways to solve a problem, so
The big picture is that we are trying to compare how quickly the runtime of algorithms grows with respect to the size of their input. We think of the runtime of an algorithm as a function of the size of the input, where the output is how much work is required to run the algorithm.
To answer those questions, we come up with a concept called Big O notation.
When talking about Big O Notation it’s important that we understand the concepts of time and space complexity, mainly because_ Big O Notation_ is a way to indicate complexities.
Complexity is an approximate measurement of how efficient (or how fast) an algorithm is and it’s associated with every algorithm we develop. This is something all developers have to be aware of. There are 2 kinds of complexities: time complexity and space complexity. Time and space complexities are approximations of how much time and space an algorithm will take to process certain inputs respectively.
Typically, there are three tiers to solve for (best case scenario, average-case scenario, and worst-case scenario) which are known as asymptotic notations. These notations allow us to answer questions such as: Does the algorithm suddenly become incredibly slow when the input size grows? Does it mostly maintain its fast run time performance as the input size increases?
#performance #development #big o complexity #big o notation #big data