Remove Consecutive Duplicates

Python Medium 3 views
Back to Questions

Problem Description

A string s is provided (no spaces). Remove consecutive duplicate characters and output result.

Input Format

One line s.

Output Format

One line result.

Sample Test Case

Input:
aaabbbcca
Output:
abca

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next