Unique Morse Code Words Leetcode Solution 9