Given a string str of lowercase characters, the task is to remove duplicates and return a resultant string without modifying the order of characters in the original string.
Examples:
Input: str = geeksforgeeks
Output: geksfor
Input: str = characters
Output: chartes
Comments