7 kyu
Flatten and sort an array
12,986 of 29,538lilsweetcaligula
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 | 42286 |
Total Skips | 3456 |
Total Code Submissions | 72174 |
Total Times Completed | 29538 |
JavaScript Completions | 12986 |
Python Completions | 8882 |
Crystal Completions | 37 |
Ruby Completions | 1105 |
Elixir Completions | 312 |
Haskell Completions | 307 |
PHP Completions | 843 |
Java Completions | 2329 |
TypeScript Completions | 805 |
Dart Completions | 924 |
CoffeeScript Completions | 18 |
Julia Completions | 57 |
Swift Completions | 1314 |
F# Completions | 39 |
C Completions | 113 |
COBOL Completions | 5 |
Rust Completions | 229 |
Total Stars | 335 |
% of votes with a positive feedback rating | 93% of 3065 |
Total "Very Satisfied" Votes | 2668 |
Total "Somewhat Satisfied" Votes | 350 |
Total "Not Satisfied" Votes | 47 |
Total Rank Assessments | 10 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |