Mobile Numeric Keypad Problem Leetcode Javascript