potter kata: simple greedy algorithm, not optimal