Don't overThink Guys
Approach \nGreedily pick the same char at s1 and s2 \nand for different char check if next char is reachable if yes then move on\n\nFor different chars we use t
# Approach \nGreedily pick the same char at s1 and s2 \nand for different char check if next char is reachable if yes then move on\n\nFor different chars we use the last_index Concept,where we check if last_index of s2[j+1] > i\n\n# Complexity\n- Time complexity:  O(N)\n\n- Space complexity: O(M) \n\n# Code\n```python3 []\nclass Solution:\n    def validSequence(self, s1: str, s2: str) -> List[int]:\n        n=len(s1)\n        m=len(s2)\n        # For Storing the last_index of each char in S2\n        last_index=[0]*m\n        j=m-1\n        i=n-1\n        # Finding the last_index of each char in S2\n        while i>=0 and j>=0:\n            if s1[i]==s2[j]:\n                last_index[j]=i\n                j-=1\n            i-=1\n        # For tracking that One Different Letter\n        Took=0\n        index=[]\n        j=0\n        for i in range(n):\n            # Reached the End of S2 so True\n            if j==m:\n                break\n            # If they are same then pick the index\n            if s1[i]==s2[j]:\n                index.append(i)\n                j+=1\n            else:\n                # If not Equal and have Changed a char already then \n                # continue as you may have chance of finding the others\n                # on S1[i+1:]\n                if Took:\n                    continue\n                # If not taken and you are at the end of S2 \n                # then its possible as you can change S2[m-1]\n                if j==m-1:\n                    index.append(i)\n                    break\n                # If not reached the end and\n                # next char of S2 can be reached then pick this index\n                if last_index[j+1]>i:\n                    index.append(i)\n                    # Mark it as taken\n                    Took=1\n                    j+=1\n        return index if len(index)==m else []\n```
['Python3']