示例#1
0
 public static void MergeTwoSorted()
 {
     LinkNode h1     = null;
     LinkNode h2     = null;
     LinkNode merged = MergeSorted(h1, h2);
 }
示例#2
0
 public void AddFirst(int val)
 {
     LinkNode temp = new LinkNode(val);
     temp.Next = this.Head;
     this.Head = temp;
 }
示例#3
0
 public LinkNode(int val)
 {
     this.Val = val;
     this.Next = null;
 }
示例#4
0
 public SingleLinkedList()
 {
     this.Head = null;
 }
示例#5
0
 public int GetIndexValue(int index)
 {
     LinkNode currrNode = this.GetIndexNode(index);
     return currrNode == null ? -1 : currrNode.Val;
 }