deleteLast method
Removes and returns the element at the last (rear) of the deque. Throws a StateError if the deque is empty.
Implementation
T deleteLast() {
if (isEmpty) {
throw StateError('Cannot delete from an empty Deque');
}
return _queue.removeLast();
}