leetcode solutions written in Java