[Community Puzzle] Retaining Water

Great puzzle! I had fun solving it. Not sure if it;s so easy :slight_smile:

1 Like

When you wanted to solve an easy puzzle and got pain in the ass instead. I like this one.

1 Like

I wonder how to find a spot for flowing water without using a floodfill ? It would be like finding the exit of a maze without pathfinding… Weird ! No idea about this simple solution ! I’ll try the floodfill one :smiley:

I know this is a long shot due to how old this conversation is, but would like to get some ideas on the approach for this puzzle. @puma17 if you are still out there, pls let me know. Thx.

#bfs #trapping_rainwater_problem
So, one has to add the edges of the pool of bourgeoisie to the queue. Then for each of the directions up,down,right,left perform the search for the positive delta between the height of the parent cell and the child cells.
Usually I choose simple puzzles to solve them on my own with the languages I am currently learning. However in this case I was unable to do so, since the puzzle is hard.
P.S. It’s important to use priority queue, so FIFO always gives minimum at position 0.

A nice and creative puzzle. I enjoyed it.

1 Like

I’m updating this to Medium based on numerous comments in that vein.

There is no way this is medium.

Look at the success rate.

You can study the success rates here. Seems pretty arbitrary to pick this one out to move. Especially since there was a big argument at inception whether it should be a clash or easy puzzle.

https://chadok.info/codingame/puzzles_list.html

Thank you for the link! I have reviewed comments on the 3 easy puzzles with a lower success rate and found there could be issues with design or implementation. I am raising this separately.