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:
7:45
Step-by-step explanation:
Since they both turn red at differnt times, you have to find a multiple to find the time they will be both on
Main St: 7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98, 105
Elm St. 15, 30, 45, 60, 75, 90, 105
They will both turn on 105 minutes or 1 hour and 45 minutes from 6
6 + 1 hr 45 min = 7:45
Answer:
c. 5 - 17
Step-by-step explanation:
a. -15 - 3 = -18
b. -3 - (-9) = 6
c. 5 - 17 = -12
d. -6 - (-6) = 0
The midpoint of (x1,y1) and (x2,y2) is

just average them
(4,1) and (-2,4)
the midpoint is

(1,-1.5)
2.5 rounds up to 3. Because the digit after the decimal point is 5 or more.