java implementation of leetcode exercises