What i did was calculated wether i had more no.of b or a and then just maintained an integer and added 2 to it accordingly
What i did was calculated wether i had more no.of b or a and then just maintained an integer and added 2 to it accordingly