3 Algorithms Parts B Sketch First Levels Recusrion Tree Node Tree Record Non Recursive Run Q37107892

3. For each of the algorithms below [parts (a) and (b)] • Sketchout first few levels of the recusrion tree. (At each node of thetree, record the non-recursive runtime.) • Compute runtime of each(full) level. • Compute length of shortest and longest branch. •Carefully use this information to compute lower and upper boundsfor T(n), working out Θ of its runtime. As you do the computations,write a sentence or two explaining your logic.

func2B (A,n) *AarTay of n integers 1 if (n 1) then return Al 2 3for i = 1 to n do 2 *2 6 end 7 x = func2B (A, 3n/5) 8 x =x+ f

func2B

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.