You have to given an array A of size N. Find all the elements which appear more than floor(N/3) times in the given array. There is a condition that you have to do your job in O(N) time complexity and O(1) space complexity. 1<=N<=10^7 0<=Ai<=10^9


one test case is getting wrong answer. whats the error?

hey @niketagarwal10 your code looks fine, could you send me the question link so that i can check it by submitting there.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.