Skip to content

Instantly share code, notes, and snippets.

@RakhmedovRS
Last active July 2, 2022 20:03
Show Gist options
  • Save RakhmedovRS/94bf17787d3873117997e9d3fa0a23e1 to your computer and use it in GitHub Desktop.
Save RakhmedovRS/94bf17787d3873117997e9d3fa0a23e1 to your computer and use it in GitHub Desktop.
public class ListNode {
/** Stores value in particular node */
int val;
/** Pointer to the next node in the linked list */
ListNode next; //
/** Different constructors */
ListNode() {}
ListNode(int val) { this.val = val; }
ListNode(int val, ListNode next) { this.val = val; this.next = next; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment