Reverse Array Problem Leetcode Python Pandas