Python - partition increasing chunks
\nclass Solution(object):\n    def isTransformable(self, s, t):\n        """\n        :type s: str\n        :type t: str\n        :rtype: bool\n        """\n   
```\nclass Solution(object):\n    def isTransformable(self, s, t):\n        """\n        :type s: str\n        :type t: str\n        :rtype: bool\n        """\n        if Counter(s)!=Counter(t):\n            return False\n        \n        parts = []\n        \n        last = \'99\'\n        for c in t:\n            if c<last:\n                parts.append(c)\n            else:\n                parts[-1]+=c\n            last = c\n        if len(parts)==1:\n            return True\n        \n        posmap = {d:[] for d in \'0123456789\'}\n        for i,c in enumerate(s):\n            posmap[c].append(i)\n        #print posmap\n        labels = [-1]*len(s)\n        \n        for i, w in enumerate(parts):\n            for c in w:\n                labels[posmap[c].pop(0)]=i\n        \n        #print parts,labels\n        \n        lseq = []\n        \n        for i,c in zip(labels, s):\n            if lseq and lseq[-1][0]==i:\n                cat = lseq[-1]\n                cat[1] = min(cat[1], c)\n                cat[2] = max(cat[2], c)\n            else:\n                lseq.append([i,c,c])\n        \n        #print lseq\n        \n        for i in xrange(len(lseq)-1):\n            if lseq[i][0]>lseq[i+1][0] and lseq[i][1]<lseq[i+1][2]:\n                return False\n        return True\n        \n        \n```\n\n3 minutes after contest. got accepted.
[]