We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I am not entirely convinced that this problem belongs under Bit Manipulation, unless someone solved this problem without using the mathematical identities: a+b = (a|b) + (a&b) and a^b = (a|b) - (a&b). Atleast in my experience, Unlike some of the other problems which under this sub-domain required less mathematical concepts. Perhaps somewhere under Mathematics:Boolean Algebra ~ 1 cent.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Xoring Ninja
You are viewing a single comment's thread. Return to all comments →
I am not entirely convinced that this problem belongs under Bit Manipulation, unless someone solved this problem without using the mathematical identities:
a+b = (a|b) + (a&b)
anda^b = (a|b) - (a&b)
. Atleast in my experience, Unlike some of the other problems which under this sub-domain required less mathematical concepts. Perhaps somewhere under Mathematics:Boolean Algebra ~ 1 cent.