In an ideal world, we want our code to run as fast as possible and take up as little memory as possible. We need a way to compare whether one approach to solving a problem is more efficient than another. The Big-O notation is a mathematical way to express the upper bound or worst-case scenario of how our code runs.
Sort: