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.
- Bit Manipulation: Lonely Integer
- Discussions
Bit Manipulation: Lonely Integer
Bit Manipulation: Lonely Integer
Sort by
recency
|
161 Discussions
|
Please Login in order to post a comment
Brute force C++ Code || Bit Manipulation
Tiny Ruby solution:
Another way of doing the code: def findLonely(arr): array = list(set(arr)) for i in range(len(array)): if arr.count(array[i]) !=2: return array[i]
Another way of doing the code: def findLonely(arr): array = list(set(arr)) for i in range(len(array)): if arr.count(array[i]) !=2: return array[i]
100 % working code with video explanation -- All Test Case Passed..!!
Here is the video explaination of my solution using XOR trick in O(n) time -
https://youtu.be/k1i6eIpeXak
and you can find most of the hackerrank solutions with video explaination here-
https://github.com/Java-aid/Hackerrank-Solutions
and many more needs to be addeed.
Regards,
Kanahaiya Gupta
Git Hub URL | https://github.com/Java-aid/
LIKE US | https://www.facebook.com/javaaid/
SUBSCRIBE US | https://goo.gl/jziyfZ
TELEGRAM LINK| https://t.me/hackerranksolutions