Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/randhir200/duplicates-encounter

Given a string of lowercase characters in range ascii[‘a’..’z’]. You can perform one operation on this string in which you can selects a pair of adjacent lowercase letters that match, and delete them. For instance, the string aab could be shortened to b in one operation. Your task is to delete as many characters as possible using this method and print the resulting string. If the final string is empty, print "Empty String" (without quotes). Please note that characters can be deleted only if they form a pair and are same(i.e from aaa we can only delete 2 a's and will be left with a single a).
https://github.com/randhir200/duplicates-encounter

Last synced: 2 days ago
JSON representation

Given a string of lowercase characters in range ascii[‘a’..’z’]. You can perform one operation on this string in which you can selects a pair of adjacent lowercase letters that match, and delete them. For instance, the string aab could be shortened to b in one operation. Your task is to delete as many characters as possible using this method and print the resulting string. If the final string is empty, print "Empty String" (without quotes). Please note that characters can be deleted only if they form a pair and are same(i.e from aaa we can only delete 2 a's and will be left with a single a).

Awesome Lists containing this project

README

        

# Duplicates-encounter
Given a string of lowercase characters in range ascii[‘a’..’z’]. You can perform one operation on this string in which you can selects a pair of adjacent lowercase letters that match, and delete them. For instance, the string aab could be shortened to b in one operation. Your task is to delete as many characters as possible using this method and print the resulting string. If the final string is empty, print "Empty String" (without quotes). Please note that characters can be deleted only if they form a pair and are same(i.e from aaa we can only delete 2 a's and will be left with a single a).