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

Stats:

CreatedSep 30, 2016
PublishedSep 30, 2016
Warriors Trained42797
Total Skips3491
Total Code Submissions73019
Total Times Completed29930
JavaScript Completions13108
Python Completions9045
Crystal Completions37
Ruby Completions1110
Elixir Completions315
Haskell Completions312
PHP Completions854
Java Completions2358
TypeScript Completions821
Dart Completions937
CoffeeScript Completions18
Julia Completions58
Swift Completions1333
F# Completions39
C Completions117
COBOL Completions5
Rust Completions245
Total Stars337
% of votes with a positive feedback rating93% of 3080
Total "Very Satisfied" Votes2682
Total "Somewhat Satisfied" Votes351
Total "Not Satisfied" Votes47
Total Rank Assessments10
Average Assessed Rank
7 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • lilsweetcaligula Avatar
  • GiacomoSorbi Avatar
  • user8476848 Avatar
  • siebenschlaefer Avatar
  • Chrono79 Avatar
  • kazk Avatar
  • JohanWiltink Avatar
  • wneumann Avatar
  • neilm Avatar
  • kingcobra Avatar
  • sfabruz Avatar
  • monadius Avatar
  • Awesome A.D. Avatar
  • hobovsky Avatar
  • cliffstamp Avatar
  • GabeAtWork Avatar
  • trashy_incel Avatar
  • user8436785 Avatar
  • ejini战神 Avatar
  • akar-0 Avatar
Ad