Skip to content
CampusEduX

Remove Duplicate Characters

Easyjavapythonccppjavascript

Given a string, remove repeated characters, keeping only the first occurrence of each character in its original position.

Input Format

A single line containing the string S with no spaces.

Output Format

Print the string after removing duplicate characters.

Related Problems

  • Reverse a String
    Easy · java, python, c, cpp, javascript
    Solve Problem
  • Check Palindrome
    Easy · java, python, c, cpp, javascript
    Solve Problem
  • Count Vowels and Consonants
    Easy · java, python, c, cpp, javascript
    Solve Problem

Input (stdin)

Output

Run your code to see output here...