LeetCode.com exercises, java version.