Question DSA-TP-0034
EasyWhich technique solves 'container with most water' efficiently?
- A.
Sorting the heights
- B.
Recursion over all pairs
- 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
Which technique solves 'container with most water' efficiently?
Sorting the heights
Recursion over all pairs
Sign up free to see the answer and a step-by-step explanation.
A hash set
Two pointers starting at both ends, moving the shorter side inwards