Question: Q 1 : Provide the runtime ( big O ) for each part below a ) assume b below is the input variable

Q1: Provide the runtime (big O) for each part below
a) assume "b" below is the input variable to the function, "a" is constant
result =0
for i from 1 to b :
result = result +a
(b)"a" and "b" below are the input variable to the function
x=0
while ab :
a=a-b
x=x+1
 Q1: Provide the runtime (big O) for each part below a)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!