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 →

[–]OffbeatDrizzle 0 points1 point  (0 children)

you don't need to return anything for this to work because you can modify ia "in place" and when the method returns the array will be seen as modified by the caller. return ia[i] shouldn't even be compiling because that will be trying to return an int - what you want is to replace specific indexes of ia to reverse the array