Hi! I recently participated in the December Cookoff. I don’t want to make excuses but my rating went down from 2star to 1star because I wasted all my time on the first problem trying to figure out what was wrong in it. I think instead of becoming sad and wasting my time, I should use it as a great learning opportunity.
So, this solution got the wrong answer. Basically I am iterating through the consecutive pairs in the array and checking if we can increment the counter (we increment the counter exactly when both the elements are NOT the most common element in the array). I tried several test cases on my own and it gave the correct answer on all. I even saw the solutions of random other people and their solutions are also similar to mine. So my question is: What is this solution missing? Edge Cases?
Any help would be appreciated.