Leetcode Find The Longest Substring In String In Java