public int Pop() { int t = this.head.GetValue(); this.head = this.head.GetNext(); return(t); }
public override string ToString() { string ray = ""; NodeInt temp = this.head; while (temp != null) { ray += temp.ToString() + " "; temp = temp.GetNext(); } return(ray); }
public void SetNext(NodeInt next) { this.next = next; }
public Stackint() { this.head = null; }
public NodeInt(int v, NodeInt next) { this.value = v; this.next = next; }
public NodeInt(int v) { this.value = v; this.next = null; }
public void Push(int v) { NodeInt ni = new NodeInt(v, this.head); this.head = ni; }