Beispiel #1
0
        public int Pop()
        {
            int t = this.head.GetValue();

            this.head = this.head.GetNext();
            return(t);
        }
Beispiel #2
0
        public override string ToString()
        {
            string  ray  = "";
            NodeInt temp = this.head;

            while (temp != null)
            {
                ray += temp.ToString() + " ";
                temp = temp.GetNext();
            }
            return(ray);
        }
Beispiel #3
0
 public void SetNext(NodeInt next)
 {
     this.next = next;
 }
Beispiel #4
0
 public Stackint()
 {
     this.head = null;
 }
Beispiel #5
0
 public NodeInt(int v, NodeInt next)
 {
     this.value = v;
     this.next  = next;
 }
Beispiel #6
0
 public NodeInt(int v)
 {
     this.value = v;
     this.next  = null;
 }
Beispiel #7
0
        public void Push(int v)
        {
            NodeInt ni = new NodeInt(v, this.head);

            this.head = ni;
        }