Reverse Array Problem Leetcode Two Sum Solution Python