This is clearly O(n) since we take one step for each symbol of T.
So this seems better than the others? Why not use this?