Reverse Array Problem Leetcode Two Sum Solution In Python