7 kyu
Suzuki needs help lining up his students!
1,136 of 3,387user8476848
Description:
Suzuki needs help lining up his students!
Today Suzuki will be interviewing his students to ensure they are progressing in their training. He decided to schedule the interviews based on the length of the students name in descending order. The students will line up and wait for their turn.
You will be given a string of student names. Sort them and return a list of names in descending order.
Here is an example input:
string = 'Tadashi Takahiro Takao Takashi Takayuki Takehiko Takeo Takeshi Takeshi'
Here is an example return from your function:
lst = ['Takehiko',
'Takayuki',
'Takahiro',
'Takeshi',
'Takeshi',
'Takashi',
'Tadashi',
'Takeo',
'Takao']
Names of equal length will be returned in reverse alphabetical order (Z->A) such that:
string = "xxa xxb xxc xxd xa xb xc xd"
Returns
['xxd', 'xxc', 'xxb', 'xxa', 'xd', 'xc', 'xb', 'xa']
Please also try the other Kata in this series..
Strings
Sorting
Fundamentals
Similar Kata:
Stats:
Created | Apr 3, 2016 |
Published | Apr 3, 2016 |
Warriors Trained | 6859 |
Total Skips | 229 |
Total Code Submissions | 16678 |
Total Times Completed | 3387 |
Python Completions | 1136 |
Ruby Completions | 284 |
JavaScript Completions | 1269 |
Crystal Completions | 10 |
Java Completions | 463 |
C# Completions | 240 |
Factor Completions | 10 |
CoffeeScript Completions | 9 |
Scala Completions | 29 |
TypeScript Completions | 86 |
COBOL Completions | 4 |
Total Stars | 116 |
% of votes with a positive feedback rating | 90% of 542 |
Total "Very Satisfied" Votes | 457 |
Total "Somewhat Satisfied" Votes | 67 |
Total "Not Satisfied" Votes | 18 |