4 ms·
The line `str = ch + str` is itself a linear-time operation, with time proportional to the length of the new string. That linear-time operation is then additio
by arcastroe 1y ago
The line `str = ch + str` is itself a linear-time operation, with time proportional to the length of the new string.
That linear-time operation is then additionally repeated `len` times