JS
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\n\n/**\n * @param {string} s\n * @param {string} t\n * @return {boolean}\n */\nfunction isTransformable (s, t, n = s.length) {\n    const indices = Array.from({ length: 10 }, () => [])\n\n    for (let i = n - 1; i >= 0; i--) {\n        indices[s[i] | 0].push(i)\n    }\n\n    for (let i = 0; i < n; i++) {\n        const num = t[i] | 0\n\n        if (!indices[num].length) {\n            return false\n        }\n\n        const index = indices[num].pop()\n\n        for (let i = 0; i < num; i++) {\n            if (indices[i].length && indices[i][indices[i].length-1] < index) return false\n        }\n    }\n\n    return true\n}\n```
['JavaScript']