Reverse Array Problem Leetcode Solutions Extensions