Leetcode Problem Reverse And Remand