5 kyu

Sort - one, three, two

370 of 2,298dinglemouse

Description:

Hey You !

Sort these integers for me ...

By name ...

Do it now !


Input

  • Range is 0-999

  • There may be duplicates

  • The array may be empty

Example

  • Input: 1, 2, 3, 4
  • Equivalent names: "one", "two", "three", "four"
  • Sorted by name: "four", "one", "three", "two"
  • Output: 4, 1, 3, 2

Notes

  • Don't pack words together:
    • e.g. 99 may be "ninety nine" or "ninety-nine"; but not "ninetynine"
    • e.g 101 may be "one hundred one" or "one hundred and one"; but not "onehundredone"
  • Don't fret about formatting rules, because if rules are consistently applied it has no effect anyway:
    • e.g. "one hundred one", "one hundred two"; is same order as "one hundred and one", "one hundred and two"
    • e.g. "ninety eight", "ninety nine"; is same order as "ninety-eight", "ninety-nine"
Sorting
Strings
Algorithms

Stats:

CreatedMar 25, 2016
PublishedMar 25, 2016
Warriors Trained12581
Total Skips2780
Total Code Submissions28485
Total Times Completed2298
Java Completions370
JavaScript Completions640
C++ Completions219
C Completions136
Python Completions845
C# Completions137
OCaml Completions9
Total Stars320
% of votes with a positive feedback rating90% of 430
Total "Very Satisfied" Votes361
Total "Somewhat Satisfied" Votes56
Total "Not Satisfied" Votes13
Total Rank Assessments8
Average Assessed Rank
5 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
6 kyu
Ad
Contributors
  • dinglemouse Avatar
  • kazk Avatar
  • docgunthrop Avatar
  • KataSideKick Avatar
  • clcraig Avatar
  • FArekkusu Avatar
  • hobovsky Avatar
  • cplir-c Avatar
  • saudiGuy Avatar
Ad