easy5 pts · first answer countsarraysstringsperformance
Building a long string in a loop
In Java you build a 1,00,000-line report by doing s = s + line inside a loop. What is the usual fix?
Discussion 0
Join free to post in the discussion.
Related questions
- Slow email during signupBackend Developer
- What EXPLAIN tells youBackend Developer
- Asking for only a few fieldsBackend Developer
- Cost of reading arr[i]Backend Developer
- Inserting at the front of an arrayBackend Developer
- Why push is amortized O(1)Backend Developer
- Changing one character of a stringBackend Developer
- Reversing a simple stringBackend Developer