Can it be solved using the technique used in harvesting rainwater problem or can that problem be solved using stack?