For 1,000 items, our algorithm takes 10 sec. to run on machine A, but now you replace the machine with machine B that is 2 times as fast. Approximately how long will that algorithm take to run on machine B for 2,000 items if the algorithm is:
a. linear (o(n))
b. quadratic(o(n^2))
c.o(n log n)
I solved quadratic and I got 40sec but I could't figure out linear and nlogn. can anyone help me?