Exercise 2.2-3 Consider linear search again (see Exercise 2.1-3). How many elements of the

Exercise 2.2-3 Consider linear search again (see Exercise 2.1-3). How many elements of the

Postby shweta14 » Sun May 11, 2008 3:29 am

Exercise 2.2-3 Consider linear search again (see Exercise 2.1-3). How many elements of the input sequence need to be checked on the average, assuming that the element being searched for is equally likely to be any element in the array? How about in the worst case? What are the average-case and worst-case running times of linear search in -notation? Justify your answers.
shweta14
Cracker
Cracker
 
Posts: 47
Joined: Sat May 10, 2008 2:56 am

Return to Chapter 2

Who is online

Users browsing this forum: No registered users and 1 guest

cron