hardlogic

An intelligent trader travels from one place to another with 3 sacks having 30 coconuts each. No sack can hold more than 30 coconuts. On the way, he passes 30 check points. At each check point, he has to give one coconut for every sack he is carrying. What is the maximum number of coconuts that he can have with him at the end of his journey?
Common Wrong Answers
“30 coconuts”
This answer assumes that the trader can keep all his coconuts without giving any away at the checkpoints, which is incorrect since he has to pay one coconut for each sack he carries.
“0 coconuts”
This answer suggests that the trader would lose all his coconuts, which is not true. He can manage his sacks to retain some coconuts, as demonstrated by the correct answer.
“15 coconuts”
This answer doesn't account for the strategic reduction of sacks; the trader can manage to keep more than 15 by smartly dropping sacks at the right checkpoints.