Comment on Turn O(n^2) reverse into O(n)parentComments−masklinn12y`acc` is assumed immutable, so it has to be copied entirely on each concatenation. Copying a string is an O(n) operation.
Comments
`acc` is assumed immutable, so it has to be copied entirely on each concatenation. Copying a string is an O(n) operation.