Class Notes (834,630)
Canada (508,661)
COMP 2710 (31)
Tina Yu (20)
Lecture

140228 - Binary Search and Collections.sort.doc

1 Page
107 Views
Unlock Document

Department
Computer Science
Course
COMP 2710
Professor
Tina Yu
Semester
Fall

Description
146 SearchingLinear or Sequential searchingAverage n2Min 1Max nBinary Search If the data is sorted determine if the value occurs in the first or second half look at the middle value not the start and end values The array must be sorted for the To calculate mid indexindex low and highstops when low is greater then high Collectionssortfor ArrayList typeArraysbinarySearchfor primitive arrays int If the value does not exist returns k 1 where k is where the v
More Less

Related notes for COMP 2710

Log In


OR

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.


Submit