Java Practice Coding Problems Leetcode 1501042933