posted by Mark on .
At Brilli's zoo, she is trying to train a monkey to learn how to count. The monkey is given a stack of cards, numbered 1 to 30, in some random order. The cards are laid out from left to right. Each time the monkey moves the card numbered i+1 to the immediate right of the card numbered i, he gets a banana. Otherwise, the monkey gets an ant bite and has to undo his move. What is the most number of bananas that the monkey can get?