Question DSA-TP-0046
MediumWhat is the time complexity of the 3-sum problem (find triplets summing to 0) using sorting plus two pointers?
- A.
O(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
What is the time complexity of the 3-sum problem (find triplets summing to 0) using sorting plus two pointers?
O(n³)
O(n)
Sign up free to see the answer and a step-by-step explanation.
O(n²)
O(n log n)