• + 1 comment

    Took an hour on understand. very confusing problem

    I think you guys interpreted problem wrongly for query type 2

    • Determine sequence number using ( ( x ^ lastAnswer ) % N ).
    • ( y % size ) tell the index in an sequence. we need assign value at that index in the sequence(Step 1) to lastAnswer.

    Hope its clear now :)