Question: Answer the following question and show how to do 14. 1 + 2 + 3 + ... +999 a) 9990 b) 99900 c) 999000 d)
14. 1 + 2 + 3 + ... +999 a) 9990 b) 99900 c) 999000 d) 500000 e) 499500 15. f(n) satisfies the recurrence relation f(n) = f(n/2) +1, inti. cond. 1) = 0. Then (n) has order: a) 2 b) n logan c) logan d) e) n 16. Linear Search has worst-case and best-case complexities, respectively: a) elog n), e(1) b) e(log n), e(logn) c) O(log n), e(n) d) en), e(log n) e) (n) (1) 17. The number of binary digits of an integer is approximately equal to: a) 2 b) n logon c) logan e) n 18. Quicksort has best, average and worst-case complexities, respectively, given by: a) On), on log n), on log n) b) (n log n), en log n), (n log n) c) (n log n), (n log n), (n) d) en log n), (rr), en) e) (n), Orr), (n) 19. Mergesort has best, average and worst-case complexities, respectively, given by: a) en), en log n), en log n) b) in log n). On log n), in log n) c) en log n), on log n), (n) d) en log n), e ), e ) c) m), ), a). 20. A sorting algorithm that is not comparison-based: a) Mergesort b) Quicksort c) Insertionsort d) Treesort e) Radix Sort 21. An efficient on-line sorting algorithm (i.e., elements added over time): a) Mergesort b) Quicksort c) Insertionsort d) Treesort e) Radix Sort
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
