
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

January 10, 2008
Five commonly used sorting algorithms are listed below:
๏ Bubble sort ๏ Insertion sort ๏ Merge sort ๏ Quick sort ๏ Bucket sort
(1) Please give pseudo code for each algorithm.
(2) Please analyze the time complexity (in Big-Oh notation) of the above algorithms, and answer the following two questions for each algorithm. a. What is the time complexity of the average case? b. What is the time complexity of the worst case?
(3) Please find those algorithms that their time complexity of average and worst case are different.
(4) Please give example datasets to show average and worst case for those algorithms found in (3).