Given a string, remove all duplicate characters while keeping only the first occurrence of each character. The relative order of the remaining characters should be preserved.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.