Comment on Turn O(n^2) reverse into O(n)parentComments−1009812ynot if you have to reallocate space for storing acc on each iteration
Comments
not if you have to reallocate space for storing acc on each iteration