Exemplo n.º 1
0
 public void push(int d)
 {
     Node t = new Node(d);
     t.next = top;
     top = t;
 }
Exemplo n.º 2
0
 public int? pop()
 {
     if (top != null)
     {
         int item = top.data;
         top = top.next;
         return item;
     }
     return null;
 }