Sea Lab interview question

3d catch the rainwater leetcode