Comparison cost of a search workload

A help-desk app performs 30 independent linear searches of a 60-element list. Fourteen searches first match at index 0, nine first match at index 23, and seven have absent targets. Each search starts at index 0, stops at its first match, and reuses no previous result. Find the total number of equality comparisons as an exact integer and the mean number per search to one decimal place.

Your answers

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Sequential Search Questions: