kakumusic's picture
Upload folder using huggingface_hub
b225a21 verified
raw
history blame
314 Bytes
class Stack<T> {
final List<T> _list = [];
void push(T element) {
_list.add(element);
}
T pop() {
var element = _list.last;
_list.removeLast();
return element;
}
T peek() {
return _list.last;
}
bool get isEmpty => _list.isEmpty;
bool get isNotEmpty => _list.isNotEmpty;
}