1. For large arrays, and in the worst case, is a sequential search faster than a binary search? Explain. 2. Show that any polynomial f(x) = c n x n + c n-1 x n-1 +…+c 1 x+c 0 is O(xn). 3. Show that...


1. For large arrays, and in the worst case, is a sequential search faster than a binary search? Explain.


2. Show that any polynomial f(x) = cnxn
+ c
n-1
x
n-1+…+c1x+c0
is O(xn).


3. Show that for all constants a, b > 1, f ( n ) is O(log a n ) if and only if f ( n ) is O(log b n ). Thus, you can omit the base when you write O(log n ). Hint: Use the identity log a n 5 log b n / log b a for all constants a, b > 1.



May 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here