Index - Assignment 1 Last updated October 5 2009 UPDATES(October 5 When an error occurs your method should throw an exception and our testing

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

View Full Document Right Arrow Icon
Assignment 1 Last updated : October 5, 2009 . UPDATES : (October 5) When an error occurs, your method should throw an exception and our testing programs will catch it. This is an example of how this works in a testing program. There was a typo in program Main2.java of problem 2 (Recursion). It has been corrected. Notes : When we mark your assignments, we will use only intergers. So do not worry about complex objects. Use the file names and method names as given below. Do not change them (e.g., switching between the lower and upper case). If you do, your program may not compile or run correctly with our test programs. This assignment consists of five programming problems. 1. Merge Sort and Insertion Sort Merge sort is more expensive than insertion sort when the array is small. Modify the given merge sort program so that when a sub-array has size equal to or smaller than a CUTOFF value, stop the recursion and switch to insertion sort. Use a CUTOFF value of 5. Complete the method MergeSort() in file
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/11/2010 for the course CSE CSE 2011 taught by Professor Neugyen during the Fall '09 term at York University.

Page1 / 2

Index - Assignment 1 Last updated October 5 2009 UPDATES(October 5 When an error occurs your method should throw an exception and our testing

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