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
|
2053 Discussions
|
Please Login in order to post a comment
I figured out that the question phrasing is poor and not consistent, since care needs to be taken to modulo index, otherwise lastAnswer becomes bigger than array bounds, Python 3 code:
The instructions say one thing about how to calculate the idx and the example shows another thing which is confussing
This question literally suck my time ,and this is none to improve your DSA skill other making you chaotic ,so better move on to the next problem.
DSA is some thing to kindle your thought beyond the given question,but here the provided essesntials are unclear.
The problem description was quite unclear, and it took me nearly an hour just to grasp what was being asked—eventually, I had to give up.
It's important not to waste too much time on poorly defined tasks, and there's no need to feel discouraged if you're unable to solve them.
Sometimes, the issue lies in the way the problem is presented, not in your ability to solve it.
horrible question. If you are reading this, lemme try to clarify. queries are in the format
[type, x, y]
and the problem incorrectly defines idx at the top, its supposed tobe idx = (x ^ lastAnswer) % n
.