
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Information on five commonly used sorting algorithms: bubble sort, insertion sort, merge sort, quick sort, and bucket sort. For each algorithm, the document asks for the pseudo code, time complexity analysis in big-oh notation, and identification of average and worst-case scenarios. Students are also asked to provide example datasets for these scenarios.
Typology: Assignments
1 / 1
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).