{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

eski HW1

# eski HW1 - CS 202 Fundamental Structures of Computer...

This preview shows pages 1–2. Sign up to view the full content.

CS 202 Fundamental Structures of Computer Science II Assignment 1 – Algorithm Analysis, Sorting and Searching Due Date: June 21, 2010 (Monday) Question-1 (30 points) Trace the following sorting algorithm for sorting the array: 7 1 9 2 3 5 into ascending order. Use the array implementation as described in the textbook/lectures. a) Insertion sort. b) Selection sort. c) Bubble sort. d) Mergesort. Also list the calls to mergesort and merge in the order in which they occur. e) Quicksort. Also list the calls to quicksort and partition in the order in which they occur. Assume that the first item is chosen as pivot. Question-2 (60 points) – Programming Assignment You are going to implement the following sorting algorithms for linked-lists of integers , and empirically test them. First, write the methods for the following sorting algorithms for linked- lists of integers. Make sure that your methods sort the given linked lists of integers in DESCENDING order. Insertion Sort Quick Sort – selects the first item as pivot Radix Sort Then, write a main method to find the time requirements of your methods for different linked lists of integers. You have to create 9 different linked lists and you have to find the time

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern