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.
- Prepare
- Algorithms
- Bit Manipulation
- Sum vs XOR
- Discussions
Sum vs XOR
Sum vs XOR
Sort by
recency
|
247 Discussions
|
Please Login in order to post a comment
Here is my Python solution! A really clever trick is to realize that the amount is just 2 raised to the amount of 0s in the binary representation of the number.
Here is my C++ solution, you can watch the explanation here : https://youtu.be/yj0yNv6BZa8
C solution
More at https://github.com/pakbungdesu/hackerrank-problem-solving.git
Java
Pyhon
Haskell