very dirty o(nlogn) solution (will refactor it and edit the post soon)
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```python3 []\nfrom collections import defaultdict\nimport bisect\nclass Solution:\n    def validSequence(self, word1: str, word2: str) -> List[int]:\n        inds_map = defaultdict(list)\n        for i in range(len(word1)):\n            inds_map[word1[i]].append(i)\n        suffix_arr = [0 for i in range(len(word1))]\n        last_ind = len(word1)\n        events = []\n        for val in reversed(word2):\n            ind = bisect.bisect_left(inds_map[val], last_ind)\n            if ind>0:\n                last_ind = inds_map[val][ind-1]\n                events.append(last_ind)\n            else:\n                break\n        events_count = 0\n        events = events[::-1]\n        #print(events)\n        #print(suffix_arr)\n        for i in reversed(range(len(suffix_arr))):\n            if len(events)>0 and i<events[-1]:\n                events.pop()\n                events_count += 1\n\n            suffix_arr[i] = events_count\n        #print(suffix_arr)\n        change_count = 0\n        final_seq = []\n        j = 0\n        for i in range(len(word1)):\n            if j==len(word2):\n                break\n            if word1[i]==word2[j]:\n                final_seq.append(i)\n                #print(final_seq)\n\n                j +=1\n                continue\n            if change_count == 0:\n                if suffix_arr[i]>=len(word2)-j-1:\n                    change_count += 1\n                    final_seq.append(i)\n                    j += 1\n            else:\n                continue\n        if j == len(word2):\n            return final_seq\n        else:\n            return []\n\n\n\n\n```
['Python3']