Reference no: EM132158972
Use the partition algorithm for the following array, [57, 45, 82, 87, 27, 72, 32, 57, 50, 33, 49, 8, 85, 71, 87, 38, 64, 27, 62, 19], choose element at index 0 as pivot element.
Provide the partition results as well as the number of comparison and exchanges used.
With the partition algorithm provided in class, each call of SortUtils.isLessThan(...) is count as one comparison, and each of SortUtils.swap(...) is count as one exchange.