Retired
sort array by last character (retired)
164 of 833nakulgupta18
Description:
Sort array by last character
Complete the function to sort a given array or list by last character of elements.
Element can be an integer or a string.
Example:
['acvd', 'bcc'] --> ['bcc', 'acvd']
The last characters of the strings are d
and c
. As c
comes before d
, sorting by last character will give ['bcc', 'acvd']
.
If two elements don't differ in the last character, then they should be sorted by the order they come in the array.
Fundamentals
Sorting
Arrays
Strings
Similar Kata:
Stats:
Created | Jul 21, 2015 |
Warriors Trained | 2074 |
Total Skips | 90 |
Total Code Submissions | 4404 |
Total Times Completed | 833 |
Ruby Completions | 164 |
Python Completions | 462 |
JavaScript Completions | 205 |
Haskell Completions | 40 |
Total Stars | 33 |
% of votes with a positive feedback rating | 84% of 270 |
Total "Very Satisfied" Votes | 205 |
Total "Somewhat Satisfied" Votes | 43 |
Total "Not Satisfied" Votes | 22 |
Total Rank Assessments | 35 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |