public void Push(object i) { head = new Elem <T>(i, head); kol++; }
public Elem(object i, Elem <T> j) { data = i; next = j; }
Stack() { head = null; kol = 0; }
public void push(T ertek) { Elem <T> elem = new Elem <T>(ertek, top); this.top = elem; }
public Verem() { this.top = null; }
public Elem(T ertek, Elem <T> kovetkezo) { Ertek = ertek; Kovetkezo = kovetkezo; }
public Elem(int i, Elem j) { data = i; next = j; }
public void Push(int i) { head = new Elem(i, head); kol++; }