Linear search performance r We analyze the successful and unsuccessful searches separately. We count how many times the search value is compared against the array elements r Successful Search o Best Case-1 comparison o Worst Case-N comparisons(N-array size) r Unsuccessful search Best case Worst Case-N comparisons C 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 10-6© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 10 - 6 Linear Search Performance We analyze the successful and unsuccessful searches separately. We count how many times the search value is compared against the array elements. Successful Search Best Case – 1 comparison Worst Case – N comparisons (N – array size) Unsuccessful Search Best Case = Worst Case – N comparisons