answer all parts plz clearly For each of the code segments b

answer all parts plz clearly

For each of the code segments below, determine an equation for the worst-case computing time T(n) (expressed as a function of n. i.e, 2n + 4) and the order of magnitude (expressed using big O notation, i.e O(n)). b.//Matrix addition for (int i = 0; i

Solution

b) T(n) = n*n So T(n) = O(n^2)
c) T(n) = n^3 + n^2 So T(n) = O(n^3)
d) T(n) = 4*n^2 So T(n) = O(n^2)
e) T(n) = log(n) base 2, So T(n) = O(logn)
  

answer all parts plz clearly For each of the code segments below, determine an equation for the worst-case computing time T(n) (expressed as a function of n. i.

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site