Question DSA-CX-0037
EasyTwo loops run one after the other (not nested), each n times. What is the total time complexity?
- A.
O(n²)
- B.
O(2ⁿ)
- 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
Two loops run one after the other (not nested), each n times. What is the total time complexity?
O(n²)
O(2ⁿ)
Sign up free to see the answer and a step-by-step explanation.
O(log n)
O(n)