Removing Duplicates in a String

What does removing duplicates mean?

Given a string that has repeating adjacent characters, we only want to keep one of each character. To do this, we aim to eliminate the repeating characters. The illustration below shows this process.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.