Advertisement
Guest User

Untitled

a guest
Jul 29th, 2015
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. While the queue is nonempty, remove two bags at the end with fewer apples.
  2. Of these two bags, call the bag with more beets X, and the other Y.
  3. Throw X into either the Left or Right pile, whichever has FEWER beets.
  4. Throw Y into the other pile.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement