Inspite of getting the correct output ,still my code is failing 3 test cases?
Hello @isingh, pls try out your code now. There were some flaws in your code. Like you were not updating the value of max_cnt and you were not resetting the cur_cnt when the adjacent elements were not equal.
Pls have a look at this, this is your code with some modifications. And in case you feel some difficulty pls ask.