6 kyu
Loneliest character
577 of 1,380aplefull
Description:
Complete the function which accepts a string and returns an array of character(s) that have the most spaces to their right and left.
Notes
- the string can have leading/trailing spaces - you should not count them
- the strings contain only unique characters from
a
toz
- the order of characters in the returned array doesn't matter
Examples
"a b c" --> ['b']
"a bcs d k" --> ['d']
" a b sc p t k" --> ['p']
"a b c de" --> ['b', 'c']
" a b c de " --> ['b']
"abc" --> ['a', 'b', 'c']
Good luck!
Strings
Algorithms
Similar Kata:
Stats:
Created | Oct 15, 2020 |
Published | Oct 15, 2020 |
Warriors Trained | 3909 |
Total Skips | 85 |
Total Code Submissions | 7389 |
Total Times Completed | 1380 |
JavaScript Completions | 592 |
Python Completions | 577 |
Ruby Completions | 56 |
C# Completions | 135 |
Java Completions | 65 |
Haskell Completions | 3 |
Total Stars | 100 |
% of votes with a positive feedback rating | 94% of 256 |
Total "Very Satisfied" Votes | 227 |
Total "Somewhat Satisfied" Votes | 26 |
Total "Not Satisfied" Votes | 3 |
Total Rank Assessments | 4 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |