Question DSA-CX-0031
EasyAn O(n) algorithm takes 2 seconds for n = 1,000,000. Roughly how long will it take for n = 3,000,000?
- A.
6 seconds
- B.
2 seconds
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Complexity Analysis question
An O(n) algorithm takes 2 seconds for n = 1,000,000. Roughly how long will it take for n = 3,000,000?
6 seconds
2 seconds
Sign up free to see the answer and a step-by-step explanation.
18 seconds
9 seconds