public int Pop() { NodeWithMin temp = last; last = last.Next; return(temp.Data); }
public void Push(int item) { int minvalue = GetMin(); if (item < minvalue) { minvalue = item; } NodeWithMin newitem = new NodeWithMin(item, minvalue); newitem.Next = last; last = newitem; }