Question DSA-TP-0071
HardWhat is the time complexity of finding the smallest subarray with sum at least S when all numbers are positive?
- A.
O(n log n)
- B.
O(S)
- C.
O(n²)
- D.
O(n)
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
Two Pointers and Sliding Window question
What is the time complexity of finding the smallest subarray with sum at least S when all numbers are positive?
O(n log n)
O(S)
O(n²)
O(n)
Sign up free to see the answer and a step-by-step explanation.