Pergunta de entrevista da empresa Celigo

Trapping rain water (leetcode 42). it is standard problem.