# Lecture Notes for CMSC 150 - INTRODUCTN TO COMPUTING LAB at Richmond (UR)

## Notes Information

 Material Type: Class Note Professor: Staff Class: CMSC 150 - INTRODUCTN TO COMPUTING LAB Subject: Computer Science University: University of Richmond Term: Spring 2008 Keywords: Sequential SearchBinary SearchComparisonsAverage-CaseIn Front OfIn Front (of)

## Sample Document Text

12/1/08  1  CMSC 150: Introduction to Computing 0 1 2 3 Problem, Bea O. Hugginkiss, Amanda Jass, Hugh Rotch, Mike Strappe, Jacques Tabooger, Ollie 4 5 Search for a Name 12/1/08  2  Sequential Search public int search( String[] array, String nameToFind ) { for ( int i = 0; i < array.length; i++ ) { if ( array[i].equals( nameToFind ) ) { return i; } } return -1; // not found } Solves the problem, but. ??Is it a "good" algorithm? 0 1 2 3 Problem, Bea O. Hugginkiss, Amanda Jass, Hugh Rotch, Mike Strappe, Jacques Tabooger, Ollie 4 5 Bea O. Problem 12/1/08  3  Solves the problem, but. ??Is it a "good" algorithm? 0 1 2 3 Problem, Bea O. Hugginkiss, Amanda Jass, Hugh Rotch, Mike Strappe, Jacques Tabooger, Ollie 4 5 Bea O. Problem Found in one step! (Best Case) Solves the problem, but. ??Is it a "good" algorithm? 0 1 2 3 Problem, Bea O. Hugginkis...

## Related Documents

Following Page Notes