In: Physics
Suppose we have an array A that contains a prime numbers from 2 to 200 in sorted order. How many items of the array A would the binary search algorithm have to examine before concluding that 60 is not in the array A?
2-
Suppose we have an array that contains 182 village name. These names are sorted alphabetically. How many names would binary search algorithm examine to locate a particular name in the array, in the worst case?
3-
Suppose we have the following array A of numbers:
A= [55, 10, 27, 65, 29, 28, 2, 9, 16, 49, 39, 30, 43, 34, 46, 60]
After 3 recursive calls to the Mergesort algorithm, choose from the following answers which one illustrates the list to be sorted?
4-
Suppose we have an array B= [13, 16, 12, 14, 18, 9, 2, 15, 8, 11]
Choose from the following answers which one shows the contents of the array after the second partition using the quicksort algorithm (Hoare algorithm)?
5-
Suppose we have an array B= [13, 16, 12, 14, 18, 9, 2, 15, 8, 11]
Choose from the following answers which one could be the first pivot element using the Hoare algorithm?
6-
Suppose we have an array B= [13, 16, 12, 14, 18, 9, 2, 15, 8, 11]
Choose from the following answers which one could be the first pivot element using Lomuto algorithm?