Leetcode Array And Arraylist Example Code Python