Remove Duplicates from a String

Remove duplicate characters from a string, which is passed by reference.

Statement

Given a string that contains duplicate occurrences of characters, remove the duplicate occurrences such that every character in the string appears only once.

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