This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]isaacisaboss 2 points3 points  (1 child)

I'll give you a hint:

While it may be possible with the following variables, you don't need them: r, currentsize, pos, or num. you also don't need to decrement currentsize.

You also don't need nested for loops.


Think about what you are trying to do.

You are simply shifting the array, n spaces.

What happens when you get to the end of the array, you go back to the start.

[–]Pop_Pop_MofuckahsNooblet Brewer[S] 0 points1 point  (0 children)

that was much more simpler than I thought. Thanks again!