CIS 431 Assignment 3
- Please show the process of sorting the following 9 numbers using each of the following 6 sorting methods and count the number of comparisons for each of them. Your answers should be close enough, if not exact, to get credit.
6, 3, 8, 5, 1, 9, 7, 4, 2
- Bubble sort
- Selection sort
- Insertion sort (insert to the right end)
- Merge sort
- Quick sort
- Heap sort
- Count the number of inversions using two methods for the above numbers. Please note that you should have the same answer for these two methods.
- Turn in a paper verion or send your answers as an email message to email@example.com by 11pm on 10/6. Please write CIS 431 and your full name on the subject line of your email.
Back to CIS 431