Smallest String Starting From Leaf Leetcode Two Sum Problem In Java