2. What is the average complexity of sequential search if there is a 0.25 chance that the target will not be found in the list and there is a 0.75 chance that when the target is in the list, it will be found in the first half of the list?
Added by Rachel S.
Close
Step 1
If the target is not in the list, the search will have to go through all n elements of the list, giving an average complexity of O(n). Show more…
Show all steps
Your feedback will help us improve your experience
Eduard Sanchez and 65 other Calculus 3 educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Suppose you are looking for an item in an ordered list one million items long. How many steps might it take to find that item with a sequential search? A binary search?
Transcendental Functions
Relative Rates of Growth
A list of $n$ items is arranged in random order; to find a requested item, they are searched sequentially until the desired item is found. What is the expected number of items that must be searched through, assuming that each item is equally likely to be the one requested? (Questions of this nature arise in the design of computer algorithms.)
A list of n items is arranged in random order; to find a requested item, they are searched sequentially until the desired item is found. what is the expected number of items that must be searched through, assuming that each item is equally likely to be the one requested?
Haricharan G.
Recommended Textbooks
Calculus: Early Transcendentals
Thomas Calculus
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD