Get the frequency count for each statement. Also the big-o notation. DSA. ASAP PLEASE

icon
Related questions
Question

Get the frequency count for each statement. Also the big-o notation. DSA. ASAP PLEASE

Lines
1- for (i=0; i< n; i++)
2-{
3-
4-
5-
6-
sum = 0;
for (j =n-1 ; j >= 0;j--)
sum += src[j];
dest[i] = sum;
7-}
Total Frequency Count, T(n)
Big-O notation, O(?)
→
Constant/Linear/Quadratic/Cubic (?) →
Frequency Count
O(?)
Transcribed Image Text:Lines 1- for (i=0; i< n; i++) 2-{ 3- 4- 5- 6- sum = 0; for (j =n-1 ; j >= 0;j--) sum += src[j]; dest[i] = sum; 7-} Total Frequency Count, T(n) Big-O notation, O(?) → Constant/Linear/Quadratic/Cubic (?) → Frequency Count O(?)
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer