Why is the complexity of simple string concatenation O(n^2)?
问题 I read on several manuals and online sources that the running time of "simple string concatenation" is O(n^2)? The algorithm is this: we take the first 2 strings, create a new string, copy the characters of the 2 original strings in the new string, and repeat this process over and over again until all strings are concatenated. We are not using StringBuilder or similar implementations: just a simple string concatenation. I think the running time should be something like O(kn) where k = number