The program will have to loop through the array once more after it is sorted, otherwise the program will not know if it has been fully sorted yet. I would suggest using a boolean variable to flag when the array is properly sorted, which you would use to terminate the loop.
No comments:
Post a Comment