Hypnos 0 Posted August 8, 2011 Report Share Posted August 8, 2011 Hello, i have problems sorting a list of integers by magnitude, actually the code has to work only with the first 6 digits which is easily accomplished by the javascript toPrecision() method. I had couple ideas how to do it, first using the javascript array.sort() method, using the list as an array. That didn't work so now i'm trying to implement a variant of the bubble sorting algorithm, but i'm a bit stuck ... i don't know how to add items to a desired list position. If someone has a idea, or even better an already made solution, please let me know. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.