4 ms·
Could you explain why adding to the end of an array results in O(n^2)? If an operation does that n times, then it's O(n^2). It's very common for self taught pr
by stcredzero 8y ago
Could you explain why adding to the end of an array results in O(n^2)?
If an operation does that n times, then it's O(n^2). It's very common for self taught programmers to write operations that do the naive addition many times. There have been entire consulting trips caused by basically that, including, so I heard, the one that brought a consultant into the Chrysler C3 project and sparked the invention of Extreme Programming.