I can help explain big O, it's a super weird concept:
Let's say you want to know the speed of an algorithm. That's a hard thing to do. First, there's the problem that it's different speeds on different computers. Then there's the problem that speed will be relative to the size of the thing you are processing. Then, there's the issue that what you really want is easy ways to compare algorithms, so you don't really want the exact speed of an algorithm but a quick estimate. Finally, you want to make it mathematically provable.
Big O is so weird because of the last two. If you want a quick estimate, you probably want it to be handwavy. But if you want it mathematically provable, then you don't. It feels like these two should be impossible to fit together. But Big O makes it work by putting algorithms into different buckets. If two algorithms are in the same bucket, you handwave minor differences in speed. But which bucket that it's in is mathematically provable.
The way Big O works is that you build an equation of how long it takes given some input with size n, then you take the largest term and you ignore any constant multipliers and smaller terms, with precise mathematical terminology that lets you do so. So the run time of some algorithm is 3 * n^2 + n, then it would be O(n^2), as that is the largest term.
The perfect place to see this in action is in sorting algorithms. They tend to fall into three main buckets - O(n^2) for slow algorithms that are easy to create, O(n lg n) for fast algorithms that are optimal, and O(n) for super fast algorithms that only work if the data you are sorting has particular properties. So simply by knowing which of these three buckets your sorting algorithm is in, I can tell if you are using a bad algorithm, using a good one, or making assumptions about your data that may or may not be true.
That’s one of the best explanation I’ve read about Big O ever, thank you for writing this.
That’s a great skill to be able to explain challenging concepts cleanly.