Algorithm Time Complexity Comparison
Algorithm C, with a time complexity of O(n \log n), sorts 1,000,000 elements in 8 seconds. Algorithm D, with a time complexity of O(n), sorts the same dataset in 20 seconds. At approximately what number of elements would both algorithms have the same execution time?
A
About 100,000 elements
B
About elements
C
About 1 billion elements
D
The algorithms will never take the same time
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
