Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Latest commit

 

History

History
22 lines (13 loc) · 757 Bytes

DuplicateEncoder.md

File metadata and controls

22 lines (13 loc) · 757 Bytes

Back to README

Day #36: Duplicate Encoder

Description:

The goal of this exercise is to convert a string to a new string where each character in the new string is '(' if that character appears only once in the original string, or ')' if that character appears more than once in the original string. Ignore capitalization when determining if a character is a duplicate.

Examples:

"din" => "((("

"recede" => "()()()"

"Success" => ")())())"

"(( @" => "))(("