Question DSA-ARR-0060
MediumTrapping rain water: heights [0, 1, 0, 2, 1, 0, 1, 3, 2, 1, 2, 1]. How many units of water are trapped?
- A.
6
- B.
5
- 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
Arrays question
Trapping rain water: heights [0, 1, 0, 2, 1, 0, 1, 3, 2, 1, 2, 1]. How many units of water are trapped?
6
5
Sign up free to see the answer and a step-by-step explanation.
8
7