Answer to Question #99849 in Algorithms for Steve

Question #99849
You are running algorithm with squared complexity on data with 100 elements and it takes 10 seconds. How much time do you expect the algorithm will take when executed on data with 1000 elements?
1
Expert's answer
2019-12-03T08:27:49-0500

Calculate the ratio of the increased number of elements with regard to the 100 elements:


"n=1000\/100=10."

An algorithm with squared complexity will require time


"m=n^2=10^2=100"

times longer than the time for 100 elements, i.e.


"t_2=mt_1=100\\cdot10=1000\\text{ s},"

or 16 minutes 40 seconds.



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS