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

Stats:

CreatedJul 21, 2015
Warriors Trained2074
Total Skips90
Total Code Submissions4404
Total Times Completed833
Ruby Completions164
Python Completions462
JavaScript Completions205
Haskell Completions40
Total Stars33
% of votes with a positive feedback rating84% of 270
Total "Very Satisfied" Votes205
Total "Somewhat Satisfied" Votes43
Total "Not Satisfied" Votes22
Total Rank Assessments35
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • nakulgupta18 Avatar
  • ZozoFouchtra Avatar
  • NaMe613 Avatar
  • anter69 Avatar
  • JohanWiltink Avatar
  • tachyonlabs Avatar
  • FArekkusu Avatar
  • user8436785 Avatar
Ad