Java Practice Coding Problems Leetcode 1501 Gaylord