Minimum Index Sum Of Two Lists Leetcode Problems Arraylist Java