Challenge overview
Hello and welcome to the challenge!
Write a code which sorts the given array containing numbers and strings. Numbers should be placed first, sorted ascending, and next followed by strings, sorted alphabetically. All values should maintain their type. Also note that numbers written as strings are strings and should be treated as them.
Input
- an array to sort containing numbers and strings
Output
- the input array sorted properly
Constraints
0 < array size < 1000
0 < max number value < 1000
0 < max string length < 1000
You can solve this programming contest in Ruby, JavaScript, Python and many other languages. If you want, you can also take part in other Challenges. Below you can find some of them:
Have fun and good luck! :)