I kept track of all occurring flavours in an unordered map, and when the map size becomes equal to k, I check for max and clear the map. I am not sure where i am going wrong…
https://www.codechef.com/viewsolution/46515911
I kept track of all occurring flavours in an unordered map, and when the map size becomes equal to k, I check for max and clear the map. I am not sure where i am going wrong…
https://www.codechef.com/viewsolution/46515911