Top String Problems Leetcode Java