why we r updating the bits please explain me updating and extracting bits
Update cnt by extracting bits
Hey @TheSourabh Since all other numbers are occuring thrice, we need to cancel all the bits occuring thrice(contriubted by repeating numbers) - so we take sum of bits at every positions(in all numbers) and take mod by 3 for every position. We maintain a array of size 64 to handle 64 bit integers. Watch the video to learn more.
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.