Beispiel #1
0
    public void Pop()
    {
        if (data == null)
        {
            return;
        }

        data = data.next;
    }
Beispiel #2
0
 public void Push(int x)
 {
     if (data == null)
     {
         data = new ListNodeMin(x, x, null);
     }
     else
     {
         data = new ListNodeMin(x, Math.Min(data.min, x), data);
     }
 }
Beispiel #3
0
 public ListNodeMin(int x, int m, ListNodeMin n)
 {
     val = x; min = m; next = n;
 }