given x and y (the field dimensions) and x*y numbers, (pieces of cheese on each square) calculate the best way for the mouse to get from (1, 1) to (x, y), he has to get as many cheese as possible... also you can only move closer to the (x, y) (so he couldn't eat the whole field).
i tried going through a row while it's sum is higher than the column's and switching them that way but i kinda failed... is there an efficient algorithm to solve this problem? ...i'd just like a clue
gregorynoob 2 Junior Poster in Training
ArkM 1,090 Postaholic
VernonDozier 2,218 Posting Expert Featured Poster
Salem 5,199 Posting Sage
ArkM 1,090 Postaholic
gregorynoob 2 Junior Poster in Training
gregorynoob 2 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.