+ 5

[CHALLENGE]Rain water drainage

For N number of buildings with some height input should look like: line 1-->5 (number of buildings) line 2-->1 2 1 1 4 (height of each building) I tried to picture the problem - | | - | | - | | - - | | | | | | | | | | | | ------------------------------- You see, the water will catch on top of buildings 3 and 4 which gives 2 units of water Main problem: finding the biggest water groupation

11th Mar 2018, 1:03 AM
Rastko Sarcevic
Rastko Sarcevic - avatar
4 Answers
+ 14
submit it as an assignment in lesson factory //and do you mean that water will catch on buildings between larger buildings
11th Mar 2018, 2:25 AM
Gaurav Agrawal
Gaurav Agrawal - avatar
11th Mar 2018, 2:53 AM
Vishal Palā„ļøāš›ļø
Vishal Palā„ļøāš›ļø - avatar
+ 1
Oh, I will do it, thanks for the heads up
11th Mar 2018, 11:23 AM
Rastko Sarcevic
Rastko Sarcevic - avatar