Suppose the list has an odd number of items, say 15. At what position is the middle
Fantastic news! We've Found the answer you've been seeking!
Question:
Suppose the list has an odd number of items, say 15. At what position is the middle item? Using sequential search, how many comparisons are required to find the middle item? Repeat this exercise with a few more odd numbers until you can do the following: if there are n items in the list and n is an odd number, write an expression for the number of comparisons required to find the middle item.
Related Book For
Discrete Mathematics and Its Applications
ISBN: 978-0073383095
7th edition
Authors: Kenneth H. Rosen
Posted Date: