Answer:
f(N) = 2+ N/2 + 6N² units of time.
Step-by-step explanation:
Assigning 0 to the variable sum takes one unit of time.
Each time you increment sum by B, you need to call the value of sum, sum it to B and assign it to sum, which takes three units of time in total. You are repeating this process for each value of B which ranges from 1 to 4n and for each value of A which ranges from 1 to n/2. Opening the FOR takes also another unit of time, so, as a result, we have
f(N) 1 + 1 (open the FOR in A)+ N/2*(1 (open the FOR in B) + 4N*3) = 2+ N/2 + 6N² units of time. It has order complexity O(N²).
Answer:
Let's start with part B. if it was originally 10 cm tall and it goes up 0.5 cm. each day, then we know that to go up one cm it needs two days. With that information we can say that 8*2 = 16. So it needs 17 days to go up 8.5 cm which would make it 18.5 cm tall.
Step-by-step explanation:
f(x) = 0.5x + 10
0.5x + 10 = 18.5
0.5x = 18.5 - 10
0.5x = 8.5
x = 8.5/0.5
x = 17 days
7x6 bc its 7in in the desighn