Radhakant Venkataramanan
About
-
Posted Questions
No Question(s) posted yet!
Posted Answers
Answer
— Your doctor can check for ketone levels, or you can do it at home with an over-the-counter kit. You simply dip a test strip into your urine. It.
Answer is posted for the following question.
Answer
Victoria Park / Barrambin
Address: 454 Gregory Terrace, Spring Hill QLD 4000, Australia
Answer is posted for the following question.
What are the best park in Brisbane, Australia olympic park?
Answer
Where to open an ELSS account There are many nationalized and private banks that give you the option of opening an ELSS account Make sure
Answer is posted for the following question.
How to open elss account?
Answer
- Tap Your Story at the top of your News Feed
- Tap to find the photo or video you want to delete
- Tap in the top right
- Tap Delete photo or Delete video
Answer is posted for the following question.
How to delete story from facebook?
Answer
Given 2 numbers, find their bitwise XOR, without using the bitwise XOR operator.
Sample Test Cases
Input 1: x = 3, y = 5Output 1: 6Explanation 1:
x = 011y = 101R = 110 = 6 (Taking the bitwise XOR)
Input 2: x = 1, y = 2Output 2: 3Explanation 2:
x = 001y = 010R = 011 = 3 (Taking the bitwise XOR)
In the naive approach, we can just simulate what the XOR operation does, i.e,
We can easily do this by traversing over all the bits of the result and setting each bit of the result as told above. The implementation is done considering the numbers as 32-bit integers.
We can optimize the above solution by simulating the XOR operation without using the for loop as follows:
We can calculate the XOR of 2 numbers using the well-known property of XOR,
a + b = (a ^ b) + 2 * (a & b)
Answer is posted for the following question.
How to calculate xor of two numbers in java?