Question: need it asap, thank you! QI) Find time complexity functions T(n) for Algorithms a, b, and c. a) Give a recursive algorithm for a binary
QI) Find time complexity functions T(n) for Algorithms a, b, and c. a) Give a recursive algorithm for a binary search. b) Give a recursive algorithm for computing an, where a is a nonzero real number and n is a non-negative integer. c) Give a recursive algorithm for computing the greatest common divisor (gcd) of two non- negative integers a and b with a < b. Q2) Find the order of magnitude for each of the algorithms, (n) in a, b, and c Q3) Write the iterative algorithms of a, b, and c. Q4) Trace algorithm c when it finds g(12, 17). Show all the steps used by the algorithm _ Q5) Give a recursive algorithm for finding the maximum of a finite set of integers, making use of the fact that the maximum of n integers is the larger of the last integer in the list and the maximum of the first n - 1 integer in the list.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
