Question DSA-TP-0068
HardFor 4-sum on a sorted array, what is the time with two nested loops and a two-pointer inner scan?
- A.
O(n² log n)
- B.
O(n⁴)
- 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
Two Pointers and Sliding Window question
For 4-sum on a sorted array, what is the time with two nested loops and a two-pointer inner scan?
O(n² log n)
O(n⁴)
Sign up free to see the answer and a step-by-step explanation.
O(n³)
O(n²)