X594: mirrorList

This method takes an ArrayList of integers as a parameter and does not return anything. The method will expand the list with a mirrored copy of its elements. At the end of the method, the given list includes the original values followed by those same values in the opposite order. For example, if a list contains {1, 2, 3, 4}, after the method call, it stores {1, 2, 3, 4, 4, 3, 2, 1}. You must modify the given list.

Examples:

mirrorList({1, 2, 3, 4})

Your Answer:

Feedback

Your feedback will appear here when you check your answer.