Previous Next
0 / 23
Module DEMO-32-108DEMO-C-32

Remove Duplicates

DEMO-C-32 โ€ข Programming in C

Browser-only practice

Problem Statement

Write a program that removes duplicate characters from a string, preserving the order of the first occurrence of each character.

Constraints

Max string length: 100

Input Format

Input:

String S

Output Format

Output:

Unique

Sample Testcases

Submit runs every public testcase in this browser. Results and code never leave this device.

Sample #1
Public sample
Component?2
Compnet?2
Removing duplicates from Component?2 gives Compnet?2.
Sample #2
Public sample
Story.2
Story.2
Removing duplicates from Story.2 gives Story.2.
Sample #3
Public sample
Scrum!9
Scrum!9
Removing duplicates from Scrum!9 gives Scrum!9.
Sample #4
Public sample
Apple#3
Aple#3
Removing duplicates from Apple#3 gives Aple#3.

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
Editor settings