Pergunta de entrevista da empresa Amdocs

Trapping water DSA question in any language