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.
Xor-sequence
Xor-sequence
Sort by
recency
|
150 Discussions
|
Please Login in order to post a comment
Haskell
So, if you look at the sequence of running XORs over the XORs, there's a pattern. I didn't give it much thought after that -- just implement the lookup function.
Hi there! Here is my Java solution for the challenge. If you'd like to discuss programming or any other topics, don't hesitate to reach out!
https://github.com/eduardocintra/hacker-rank-solutions/blob/master/src/br/com/eduardocintra/medium/xorsequence/XorSequence.java
c++ optimal one
where is an array to search or to perform a function
like zaber04 said, we need to set up an array starting from 0 to a certain number to see the pattern. The following is the code I use to set up the array and observe the pattern: