This flashcard is just one of a free flashcard set. See all flashcards!
19
Stack / Implementierung
public class Stack{
private Liste stack;
public Stack(){
stack = new Liste();
}
public int top(){
return stack.getFirst();
}
public void push(int zahl){
stack.addFirst(zahl);
}
public void pop(){
stack.removeFirst();
}
private Liste stack;
public Stack(){
stack = new Liste();
}
public int top(){
return stack.getFirst();
}
public void push(int zahl){
stack.addFirst(zahl);
}
public void pop(){
stack.removeFirst();
}
Flashcard info:
Author: hristiana86
Main topic: Informatik
School / Univ.: HS
City: Mannheim
Published: 14.06.2010