Give the asymptotic running time of each the following functions in Θ notation. Justify your answer. (Show your work.)
Func9 (n) 3 while (i 2 1) do swhile (j
Communicate the asymptotic floating duration of each the aftercited functions in Θ notation. Justify your defense. (Show your toil.)
Func9 (n) 3 conjuncture (i 2 1) do sconjuncture (j
Please communicate the thumbs up, if it is advantageous ce you. Let me understand if you keep any dubitate.
Solution 9)
Inner loop earn take log(n2) times and Outer loop earn run n2 times.
So the aggravate confusion would be:
=> n2.log2(n2)
=> n2.2log2(n)
=> Θ n2.log2(n)
Solution 10)
Inner loop earn take n2-6 times and Outer loop earn run log5(7n-4) times.
So the aggravate confusion would be:
=> log5(7n-4).(n2-6)
=> n2.log5(n)
=> Θ n2.log5(n)