You are viewing a single comment's thread. Return to all comments →
This is a good reason to start looping on the first element of the input, rather than the output.
But the problem statement does say you are "Given an array" (not a stream).
Arrays: Left Rotation
You are viewing a single comment's thread. Return to all comments →
This is a good reason to start looping on the first element of the input, rather than the output.
But the problem statement does say you are "Given an array" (not a stream).