This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public SLinkedList { | |
// header always points to the sentinel node; header is NEVER null | |
ListNode header; | |
public SLinkedList() { | |
// point to a dummy ListNode that serves as the sentinel node | |
// its data doesn't matter | |
header = new ListNode(-1); | |
} | |
OlderNewer