Codewars DuplicateEncoder Java solution

Pubblicato il: 17 dicembre 2021
sul canale di: Dave Kirkwood
613
9

Duplicate Encoder is the third exercise that I have tried in CodeWars. Its a 6 kyu task. A string has to be converted into a series of brackets of the same length as the string. An open bracket is required if the character appears only once in the original string and a closed bracket represents a character that appears more than once in the original string.

My solution first loops through the string and counts each of the characters. It then loops back through the original string to create the sequence of brackets, based on the count of characters from the first loop.


In questa pagina del sito puoi guardare il video online Codewars DuplicateEncoder Java solution della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Dave Kirkwood 17 dicembre 2021, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 613 volte e gli è piaciuto 9 spettatori. Buona visione!