Hi all genius minds. I have a small algorithm question. Any help will be appreciated.
Suppose there is a lake (some height lh) and then there are hills/mountains (with height from 0 to 9). And finally there is Dam. All the hills and the lake and the dam are on a n*m matrix. given the height of all points on matrix (lake and dam are also on one such point). find the minimum cost required to create a path from lake to dam so that dam can be filled with water. Now height of each point can be increased or decreased except the lake. water can flow only along the adjacent points not along the diagonals. Water can flow from point A to adjacent point B iff heightA >=heightB ----------------------------------------------------------------------------------------- If we could only decrease the heights, this was a very easy question. but in current case heights can be decreased as well. How do we solve this.? Please revert for any clearifiactions -- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To post to this group, send email to google-code@googlegroups.com. To unsubscribe from this group, send email to google-code+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-code?hl=en.