|
-
September 10th, 2009, 11:09 AM
#1
Runtime question
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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|