Aggressive cows


please see why my all test cases are not running right

same was the case for book allocation question,when i was writing the right code, it was not executing 100% successfully…so please tell me where am i lacking