Next: Exercise 5. Up: Exercises Previous: Exercise 3.

Exercise 4.

Write a Maple procedure which sorts an array of numbers faster than the bubblesort algorithm in the section on arrays, e.g. by using shell sort, quick sort, merge sort, or heap sort or some other sorting algorithm. Modify your Maple procedure to accept an optional 2nd argument , a boolean function to be used for comparing two elements of the array.


bondaren@thsun1.jinr.ru