about | help | code help+videos | done | prefs |
Given a string, find the same characters, put them together and return a new string having the same characters together. e.g. if the given string is "ababcfdccab", the new string should look like "aaabbcccfd". You can assume all the characters are in lowercase and there will be no space in the given string. And the order of characters matters. putTogether("") → "" putTogether("acda") → "aacd" putTogether("1w2g1dw2md2") → "11ww222gddm" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 190 Post-solution available
Copyright Nick Parlante 2017 - privacy