Space O(1), we can just skip invalid character when processing the string, not need to create a processed string which occupies extra space
Time O(n) - We need to use 2 pointers to process each character once
2nd attempt (java)
3rd attempt (java) (15mins) ❤️ (most efficient)
4th attempt (java) ❤️ (most clear solution)