Question: 5. A binary search takes how many steps? c) O(n) d) O(n lg n) b) O(lg n) 6, times faster than linear search d) 3,000,000

5. A binary search takes how many steps? c) O(n) d) O(n lg n) b) O(lg n) 6, times faster than linear search d) 3,000,000 e) 30,000,00 when N = 1,000,000,000, binary search will be roughly a) 1000 b) 30,000 c) 300,000 7. What is the sum of the values 1, 2, 3, 4,... N-1, N? a) N2 b) N*(N-1)/2 c) 2N-1 8. What is the sum of the values NN/2 N/4N/8+ 2 1, assuming N is a power of two? a) N2 b) N*(N-1)/2 c) 2*N - 1 9. What is the worst-case time for quicksort to sort an array of n elements? a) O (n2) b) O (n) c) O (n lg n) d) O (n3)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
