I need to modify modules used in the book that run a bubble sort, selection sort, and insertion sort on an integer array such that each module keeps a count of the number of swaps it makes.
How do I code for this?
Then we have to design an application that uses 3 identical arrays of at least 20 integers. That calls each module on a different array, and display the number swaps made by each algorithm.
Beginner course, Using Programming Logic and Design by Tony Gaddis (3rd Ed.) - Chapter 9