Give the asymptotic general space of each the aftercited functions in Θ referableation. Justify your vindication. (Show your labor.)
Func1 (n) 2 control i ← IyMj to 41 4period (j) do do j←j+10: 6 7purpose s purpose recur (s Func2 (n) 2 i = 2; 3 period (i 3 n2) do control j ← i to 2i 6 purpose s purpose o recur (s);
1. Step 1 and 5 do appoint values to s. Those do referable effect any estrangement in the runspace complication.
Line 2, control loop executes in √n).
Line 4 executes in (√n)^5) or n^2*√n) consequently j increases in straight method and i^5 is in n^2*√n dispose.
Hence, sum complication, n^2*√n*√n) = n^3).
2. Line 4, control loop, executes in n*logn dispose (consequently of i increasing straightly) and the oyter period executes in n^2 dispose.
Hence, sum complication, n^3*logn),