I'm using a recursive function to sort an array in a specific way but I can't work out a good way to flag when the function is complete. The recursive function...