2022-04-08 Binary Search

Last updated about 3 years ago
9 questions
Required
10

You are searching an array that contains 1024 UNSORTED values. The value you are searching for is present in the array. You are using a LINEAR search, looking at each value sequentially in order to find the value that matches. If you repeat this search many times, what is the average number of elements in the array you will have to examine before you find the element you are searching for?

Required
10

You are searching an array that contains 1024 SORTED values. The value you are searching for is present in the array. You are using a LINEAR search, looking at each value sequentially in order to find the value that matches. If you repeat this search many times, what is the average number of elements in the array you will have to examine before you find the element you are searching for?

Required
10

You are searching an array that contains 1024 values. The value you are searching for is present in the array. You are using a LINEAR search, looking at each value sequentially in order to find the value that matches. If you repeat this search many times, what is the MAXIMUM number of elements in the array you will have to examine before you find the element you are searching for?

Required
10

You are searching an array that contains 1024 SORTED values. The value you are searching for is present in the array. You are using a BINARY search, looking at the middle element of the array and determining which half of the array to search next if the value is not found. If you repeat this search many times, what is the MAXIMUM number of elements in the array you will have to examine before you find the element you are searching for?

Required
10

In a linear search of an array with n elements, what is the EXPECTED number of iterations it will take to find the element you are looking for. State your answer in terms of n.

Required
10

In a linear search of an array with n elements, what is the MAXIUMUM number of iterations it will take to find the element you are looking for. State your answer in terms of n.

Required
10

In a binary search of an array with n elements, what is the MAXIMUM number of iterations it will take to find the element you are looking for. State your answer in terms of n.

Required
15

Select the statements that are true in regards to searching.

Required
15

Select the statements that are true in regards to searching.