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.
It might be sorting the numbers 'alphabetically' instead of 'numerically'....my JS code only passed the first two tests until I realised this. Need the array contents to be integers not string characters. So my array was looking like 2,20,23,26,3,4,5,52, 6 etc
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Insertion Sort - Part 2
You are viewing a single comment's thread. Return to all comments →
It might be sorting the numbers 'alphabetically' instead of 'numerically'....my JS code only passed the first two tests until I realised this. Need the array contents to be integers not string characters. So my array was looking like 2,20,23,26,3,4,5,52, 6 etc