Walmart interview question

Asked in Coding Interview Maximum Product Subarray Trapping Rain Water (Search with this in GeeksForGeeks)