WA in buy1get1 problem

I tested my code of all type of combination and it shows write answer please anyone suggest me some tricky input for Buy1Get1 problem.

this is a ‘tricky’ requirement by the way!! :slight_smile:
i could help you, by looking at your code… which would mean after the competition is over!
it will be difficult for me to give a generic ‘tricky’ test case!

The ‘trick’ is, you buy one, you get another similar one, absolutely free. :wink:

1 Like