Remove Duplicates
Practice
3.8 (40 votes)
Algorithms
Approved
Easy
Open
Problem
90% Success 13806 Attempts 20 Points 2s Time Limit 256MB Memory 1024 KB Max Code

Given a string S. Your task is to remove all duplicates characters from the string S

NOTE:
1.) Order of characters in output string should be same as given in input string.
2.) String S contains only lowercase characters ['a'-'z'].

input:
Input contain a single string S.

Output:
Print the string S with no any duplicate characters.

Constraints:
Test Files 1 to 5:
1<=|S|<=100
Test Files 6 to 10:
1<=|S|<=100000

Sample Output #1
hacker

Sample Output #1
hacker

Sample Input #2
hackerearth

Sample Output #2
hackert

Sample Input #3
programming

Sample Output #3
progamin

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:20
45 votes
Tags:
Ad-HocApprovedEasyOpen
Points:20
96 votes
Tags:
AlgorithmsBrute ForceEasyString Manipulationeasy
Points:20
2 votes
Tags:
AlgorithmsBasics of String ManipulationString Algorithms