3 ms·
Comp sci 101. Learned it my first year. There really isn't anything to it. It just describes how the number of operations grow as the number of inputs in your a
by bongodongobob 1y ago
Comp sci 101. Learned it my first year. There really isn't anything to it. It just describes how the number of operations grow as the number of inputs in your algorithm increases. It looks scary, but it's very simple and straightforward.
- nwatson 1y agoIt can get a lot more complicated though. At times there are more parameters to an algorithm's complexity than just `n`. E.g., the parameters for big-O might be `n`, `K`, and `ρ`, and some expressions in the big-O might involve combinations of those parameters. In such cases as well, one might know for a specific application of the algorithm that, for example, `ρ` is bounded, and so the big-O becomes more influenced by the `n` and `K`.
- bongodongobob 1y agoYeah that's fair. Calc 1 should be enough to understand that.
- Sankozi 1y agoYou are commenting under blog post that tried to explain it and got it wrong. It is not simple. Examples: - algorithm with O(2^n) complexity might be faster for your problem than O(1) algorithm - the same algorithm may be O(2^n) or O(n³) depending how you define size function This is not straightforward.
- bongodongobob 1y agoIt is though.
- fxwin 1y agothat's why he said it describes how runtime behaves as input size changes, not how it behaves for specific values