Question: Java 1) Suppose int[] intArray = {2, 4, 5, 16, 28, 32, 40}. What is the order of elements identified for comparison when the binary
Java
1) Suppose int[] intArray = {2, 4, 5, 16, 28, 32, 40}. What is the order of elements identified for comparison when the binary search algorithm attempts to find the value 5 in intArray?
2)
Suppose int[] intArray = {2, 4, 5, 16, 28, 32, 40}. What is the order of elements identified for comparison when the linear search algorithm attempts to find the value 5 in intArray?
3) Check the statements about Big O notation that are true.
| a) | Big O notation describes how long it will take a programmer to code an algorithm |
| b) | Big O notation describes an algorithm's efficiency in terms of the work required to solve a problem |
| c) | In Big O notation, constants are ignored |
| d) | Big O notation indicates the number of seconds an algorithm takes to run |