Typed Out String Leetcode Problems Javascript Map