CS 303L Data Structures and Algorithms Homework 1: Sorting Algorithms, Assignments of Computer Science

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

Pre 2010

Uploaded on 04/12/2010

koofers-user-p1i
koofers-user-p1i 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 303L Data Structure and Algorithm
January 10, 2008
Homework 1
(Due on January 17, 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).

Partial preview of the text

Download CS 303L Data Structures and Algorithms Homework 1: Sorting Algorithms and more Assignments Computer Science in PDF only on Docsity!

CS 303L Data Structure and Algorithm

January 10, 2008

Homework 1

(Due on January 17, 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).