It should have been classified as Easy
\n/**\n * @param {string} s\n * @return {boolean}\n */\nvar splitString = function(s) {\n    const len = s.length\n    \n    function toKey(fromIndex, fromVal) 
```\n/**\n * @param {string} s\n * @return {boolean}\n */\nvar splitString = function(s) {\n    const len = s.length\n    \n    function toKey(fromIndex, fromVal) {\n        return [fromIndex, fromVal].join(\'|\')\n    }\n    // key => result of key\n    const map = new Map()\n    function isOK(fromIndex, fromVal) {\n        if (fromIndex === len)  return true\n        \n        const key = toKey(fromIndex, fromVal)\n        if (map.has(key))   return map.get(key)\n        \n        const seekMe = -1 + fromVal\n        let result = false\n        for (let endIndex = fromIndex; endIndex < len; endIndex++) {\n            const val = Number(s.slice(fromIndex, 1 + endIndex))\n            if (val === seekMe) {\n                if (seekMe !== 0) {\n                    result = isOK(1 + endIndex, seekMe)\n                    break\n                } else {\n                    result = result || isOK(1 + endIndex, seekMe)\n                }\n            }\n        }\n        map.set(key, result)\n        \n        return result\n    }\n    \n    \n    for (let endIndex = 0; endIndex < -1 + len; endIndex++) {\n        const fromIndex = 1 + endIndex\n        const fromVal = Number(s.slice(0, 1 + endIndex))\n        let subresult = isOK(fromIndex, fromVal)\n        if (subresult)  return subresult\n    }\n    \n    \n    return false\n};\n```
[]