Remove Duplicate Characters

PHP Medium 5 views
Back to Questions

Problem Description

Remove duplicate characters but keep the first occurrence (spaces included).

Input Format

One line string s.

Output Format

One line result.

Sample Test Case

Input:
banana
Output:
ban

Constraints

|s|

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next