Removing Duplicates in a String

What does removing duplicates mean?

When given a string that has repeating adjacent characters, we only want to keep one of each character. To do this, we must eliminate the repeating characters.

The illustration below shows this process.

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