Question: Complexity Advanced algorithms exercise 1 Complexity What is the order of magnitude of) complexity of the following algorithm : mysteryAlgo (s, al), size) if s=0
Complexity Advanced algorithms exercise
1 Complexity What is the order of magnitude of) complexity of the following algorithm : mysteryAlgo (s, al), size) if s=0 return true if size=0 return false return mysteryAlgo (s-a [size-1],a,size-1) or mysteryAlgo(s,a, size-1) Useful details unit operation : logical wor>> - parameter : size - to simplify the calculation, we do not consider or as a lazy operation : when computing a or b, b is evaluated even if a is true
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
