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
- Data Structures
- Arrays
- Dynamic Array
- Discussions
Dynamic Array
Dynamic Array
Sort by
recency
|
2078 Discussions
|
Please Login in order to post a comment
It appears that result comparison for all the test cases is not correct. I implemented as the problem defined. For me only test cae 10 is successful and all other is failing. But when I use Test Case 1 input data as custom input, result is successful.
Thank you to the comments that explained the missing parts of the question.
The problem definition is incorrect.
The problem definition is incorrect.
It states that: idx = (x ⊕ lastAnswer)
But it should read: idx = (x ⊕ lastAnswer) % n
where n is one of the input variables.