Bidding algorithm and test case.