Pregunta de entrevista de Millennium

Pretty basic leetcode question, variation of trapping rain water