How to understand "You may not modify the values in the list"


  • 0
    M

    "You may not modify the values in the list, only nodes itself can be changed."

    Does it mean that I could not swap the values between two nodes in a pair? I should only swap the node objects/references?

    It seems that the judge system does not stop me if I swap values.


  • 0
    S

    You are right, should swap the node, not just the value.

    However, judger do not really check it yet, might enhance the checker later.

    For now, since LeetCode is focus on interview problem. I believe no one would cheat on this thing when they are preparing for that.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.