FeralDruidonWoW
September 10th, 2009, 11:09 AM
I have this problem:
Consider programs A and B that have been analyzed and found to have worst-case running times no greater than 2n2 and 100nlogn respectively.
in order to find out if A runs faster than B for certain values should i look for whichever runtime produces the smallest number?
ex: n = 1000
2n2 = 2000000
100nlogn = 30000 so program b runs faster. Is this the correct way to do this problem?
Consider programs A and B that have been analyzed and found to have worst-case running times no greater than 2n2 and 100nlogn respectively.
in order to find out if A runs faster than B for certain values should i look for whichever runtime produces the smallest number?
ex: n = 1000
2n2 = 2000000
100nlogn = 30000 so program b runs faster. Is this the correct way to do this problem?