Algorithm Time Complexity Comparison
Two sorting algorithms are being compared on a dataset with 1 million elements. Algorithm C takes 8 seconds with a time complexity of O(n \log n). Algorithm D takes 20 seconds with a time complexity of O(n). For what approximate dataset size would both algorithms take the same amount of time?
A
About 1 billion elements
B
The algorithms will never take the same time
C
About 100,000 elements
D
About $$10^{15}$$ elements
Question Leaderboard
| Rank | |||||
|---|---|---|---|---|---|
| #1 | 20231725 | 1 | 1 | 0m 46s | 54 |
| #2 | lriverapolanco | 0 | 2 | 0m 00s | -20 |
| #3 | andymeng14440 | 0 | 1 | 0m 20s | -30 |
| #4 | tianbo.shen | 0 | 1 | 0m 23s | -33 |
| #5 | jdvillalta865 | 1 | 1 | 1h 00m | -3,558 |
| #6 | vdang29 | 0 | 1 | 2h 48m | -10,142 |
Items per page:
10
1 – 6 of 6
APFIVE