Eski HW1 - CS 202 Fundamental Structures of Computer Science II Assignment 1 Algorithm Analysis Sorting and Searching Due Date(Monday Question-1(30

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

View Full Document Right Arrow Icon
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
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/01/2011 for the course CS 202 taught by Professor Amaşlm during the Spring '11 term at Bilkent University.

Page1 / 3

Eski HW1 - CS 202 Fundamental Structures of Computer Science II Assignment 1 Algorithm Analysis Sorting and Searching Due Date(Monday Question-1(30

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online