7 kyu
Flatten and sort an array
13,108 of 29,930lilsweetcaligula
Description:
Challenge:
Given a two-dimensional array of integers, return the flattened version of the array with all the integers in the sorted (ascending) order.
Example:
Given [[3, 2, 1], [4, 6, 5], [], [9, 7, 8]], your function should return [1, 2, 3, 4, 5, 6, 7, 8, 9].
Addendum:
Please, keep in mind, that JavaScript is by default sorting objects alphabetically. For more information, please consult:
http://stackoverflow.com/questions/6093874/why-doesnt-the-sort-function-of-javascript-work-well
Arrays
Sorting
Fundamentals
Similar Kata:
Stats:
Created | Sep 30, 2016 |
Published | Sep 30, 2016 |
Warriors Trained | 42797 |
Total Skips | 3491 |
Total Code Submissions | 73019 |
Total Times Completed | 29930 |
JavaScript Completions | 13108 |
Python Completions | 9045 |
Crystal Completions | 37 |
Ruby Completions | 1110 |
Elixir Completions | 315 |
Haskell Completions | 312 |
PHP Completions | 854 |
Java Completions | 2358 |
TypeScript Completions | 821 |
Dart Completions | 937 |
CoffeeScript Completions | 18 |
Julia Completions | 58 |
Swift Completions | 1333 |
F# Completions | 39 |
C Completions | 117 |
COBOL Completions | 5 |
Rust Completions | 245 |
Total Stars | 337 |
% of votes with a positive feedback rating | 93% of 3080 |
Total "Very Satisfied" Votes | 2682 |
Total "Somewhat Satisfied" Votes | 351 |
Total "Not Satisfied" Votes | 47 |
Total Rank Assessments | 10 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |