6 kyu
Simple decrypt algo
1,061 of 1,820mkelty
Description:
You'll be given a string of random characters (numbers, letters, and symbols). To decode this string into the key we're searching for:
(1) count the number occurences of each ascii lowercase letter, and
(2) return an ordered string, 26 places long, corresponding to the number of occurences for each corresponding letter in the alphabet.
For example:
'$aaaa#bbb*cc^fff!z' gives '43200300000000000000000001'
^ ^ ^ ^ ^ ^^^ ^ ^
[4] [3] [2][3][1] abc f z
'z$aaa#ccc%eee1234567890' gives '30303000000000000000000001'
^ ^ ^ ^ ^ ^ ^ ^
[1][3] [3] [3] a c e z
Remember, the string returned should always be 26 characters long, and only count lowercase letters.
Note: You can assume that each lowercase letter will appears a maximum of 9 times in the input string.
Strings
Fundamentals
Similar Kata:
Stats:
Created | Jan 1, 2017 |
Published | Jan 1, 2017 |
Warriors Trained | 2619 |
Total Skips | 49 |
Total Code Submissions | 4455 |
Total Times Completed | 1820 |
Python Completions | 1061 |
Haskell Completions | 71 |
C Completions | 144 |
Ruby Completions | 71 |
JavaScript Completions | 533 |
Scala Completions | 12 |
BF Completions | 5 |
Total Stars | 34 |
% of votes with a positive feedback rating | 94% of 333 |
Total "Very Satisfied" Votes | 300 |
Total "Somewhat Satisfied" Votes | 28 |
Total "Not Satisfied" Votes | 5 |
Total Rank Assessments | 11 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |