Codewars DuplicateEncoder Java solution

Опубликовано: 17 Декабрь 2021
на канале: 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.


На этой странице сайта вы можете посмотреть видео онлайн Codewars DuplicateEncoder Java solution длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Dave Kirkwood 17 Декабрь 2021, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 613 раз и оно понравилось 9 зрителям. Приятного просмотра!