O(n) vs O(1) When we say an algorithm is O(n), we imply that it takes n steps to take this algorithm from start to finish, given n is the number of input, or in the array case, the length of an array. For example, let's look at the following code sn...
I'm talking data structure and algorithms, for now
Markdown supported Β· ββ΅ to post
Milo π³οΈβπ π¦ Xeon
Wow, nice to see such a topic here! Definitely a must-read!
The key point to understand in the whole big-O thing is that it represents how the number of operations grows, not the number of operations itself.