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