LeetCode 151 Problem Solutions JAVA implementation