We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
This problem requires to sort in ascending order of "integers". With simple string comparison, you'll get
11023
while 10 shall go to the last. So the naive solution is to convert all strings into numbers first and to sort the numbers, but it will be much slower and it will require a special number data type to hold big numbers.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Big Sorting
You are viewing a single comment's thread. Return to all comments →
This problem requires to sort in ascending order of "integers". With simple string comparison, you'll get
while 10 shall go to the last. So the naive solution is to convert all strings into numbers first and to sort the numbers, but it will be much slower and it will require a special number data type to hold big numbers.