Leetcode Array And Arraylist In Python How To Sort