I have seen the subsequent video of Boyer-Moore majority vote algorithm, but i had my own approach for the question through unordered mapping and then printing out the keys. The test cases #0 and #1 won’t pass, I am trying to find the boundary cases but I am unable to find the issue is it the complexity?
Unable to solve test 0 and test 1
hello @taneja7.manik

this elseif should not be there inside for loop.
put it outside the for loop. and print if count==0
I’ll try to work on the order then thank you