Simple C++ greedy solution(14 lines)
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:\nO(n)\n\n- Space complexity:\nO(n)\n\n# Code\n```\nclass Solution {\npublic:\n    bool isTransformable(string s, string t) {\n        int n = s.length();\n        vector<int> pos(10, n);\n        for(int i=0; i<n; i++){\n            if(pos[s[i]-\'0\'] == n) pos[s[i]-\'0\'] = i;\n        }\n        for(int i=0; i<n; i++){\n            int num = t[i]-\'0\';\n            if(pos[num] == n) return 0;\n            for(int j=0; j<num; j++){\n                if(pos[j] < pos[num]) return 0;\n            }\n            pos[num]++;\n            while(pos[num]<n && s[pos[num]]-\'0\' != num) pos[num]++;\n        }\n        return 1;\n    }\n};\n```
['C++']