7 kyu
Double Sort
2,592 of 5,091PG1
Description:
Simple enough this one - you will be given an array. The values in the array will either be numbers or strings, or a mix of both. You will not get an empty array, nor a sparse one.
Your job is to return a single array that has first the numbers sorted in ascending order, followed by the strings sorted in alphabetic order. The values must maintain their original type.
Note that numbers written as strings are strings and must be sorted with the other strings.
Fundamentals
Strings
Arrays
Sorting
Similar Kata:
Stats:
Created | Sep 4, 2016 |
Published | Sep 4, 2016 |
Warriors Trained | 8331 |
Total Skips | 256 |
Total Code Submissions | 17712 |
Total Times Completed | 5091 |
JavaScript Completions | 2592 |
Python Completions | 1617 |
Ruby Completions | 161 |
Java Completions | 523 |
Kotlin Completions | 304 |
Total Stars | 89 |
% of votes with a positive feedback rating | 92% of 948 |
Total "Very Satisfied" Votes | 820 |
Total "Somewhat Satisfied" Votes | 104 |
Total "Not Satisfied" Votes | 21 |
Total Rank Assessments | 23 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 8 kyu |