7 kyu
Flatten and sort an array
13,091 of 29,882lilsweetcaligula
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 | 42751 |
Total Skips | 3486 |
Total Code Submissions | 72926 |
Total Times Completed | 29882 |
JavaScript Completions | 13091 |
Python Completions | 9031 |
Crystal Completions | 37 |
Ruby Completions | 1110 |
Elixir Completions | 314 |
Haskell Completions | 311 |
PHP Completions | 853 |
Java Completions | 2350 |
TypeScript Completions | 821 |
Dart Completions | 935 |
CoffeeScript Completions | 18 |
Julia Completions | 58 |
Swift Completions | 1328 |
F# Completions | 39 |
C Completions | 116 |
COBOL Completions | 5 |
Rust Completions | 244 |
Total Stars | 338 |
% of votes with a positive feedback rating | 93% of 3077 |
Total "Very Satisfied" Votes | 2679 |
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 |