so i wrote this code and it SHOULD work but for some reason when it runs it doesn't actually sort the numbers, it just moves them around, but iv looked at it and it looks like it should work.
any ideas?
At present your function smallest1() returns the smallest number in the entire array. (with a minor bug, I guess you meant the initial value of minI to be 0).
The function smallest should return the smallest number in the array a particular index onwards.
That is because once you find the smallest number and place it in its proper position, now you want the next smallest number. You do not want the function to return the same smallest number again and again.