Could anyone explain this line: ListNode(int x) { val = x; } to me?


  • 0
    L

    ""
    public class ListNode {
    int val;
    ListNode next;
    ListNode(int x) { val = x; } ########What does this do?
    }
    ""


Log in to reply
 

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