7 kyu
Sort with a sorting array
1,414 of 1,502madmed88
Description:
Sort an array according to the indices in another array.
It is guaranteed that the two arrays have the same size, and that the sorting array has all the required indices.
sort(['x', 'y', 'z'], [1, 2, 0]) => ['z', 'x', 'y']
sort(['z', 'x', 'y'], [0, 2, 1]) => ['z', 'y', 'x']
Arrays
Fundamentals
Sorting
Similar Kata:
Stats:
Created | Oct 10, 2017 |
Published | Oct 10, 2017 |
Warriors Trained | 3053 |
Total Skips | 51 |
Total Code Submissions | 6589 |
Total Times Completed | 1502 |
JavaScript Completions | 1414 |
Haskell Completions | 97 |
COBOL Completions | 5 |
Total Stars | 36 |
% of votes with a positive feedback rating | 89% of 287 |
Total "Very Satisfied" Votes | 236 |
Total "Somewhat Satisfied" Votes | 37 |
Total "Not Satisfied" Votes | 14 |
Total Rank Assessments | 18 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 8 kyu |