Func2(n) 1 2 3 4 5 6 7 S← 0; for in to 2n do for j end 10i + 7 to 10i + 21 do s ← s + i − j; ss+i- end return (s);
Func2(n) 1 2 3 4 5 6 7 S← 0; for in to 2n do for j end 10i + 7 to 10i + 21 do s ← s + i − j; ss+i- end return (s);
Related questions
Question
Please help with this question:
Determine the running time of the following algorithms. Write summations to represent loops and simplify. Show all work. If bounding is used, the upper and lower bounds must only differ by a constant. Note: This is not the line-by-line analysis method. Loops are inclusive.
![b)
Func2(n)
1
2
3
4
5
6
7
S← 0;
for in to 2n do
for j
end
10i + 7 to 10i + 21 do
ss + i- j;
end
return (s);](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F04e085e1-7c38-44a5-b507-5c3f05209d33%2F3d025a1c-d05a-409c-b736-42416b8f94a9%2F8rv3yri_processed.png&w=3840&q=75)
Transcribed Image Text:b)
Func2(n)
1
2
3
4
5
6
7
S← 0;
for in to 2n do
for j
end
10i + 7 to 10i + 21 do
ss + i- j;
end
return (s);
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)