Deque Generic LinkedList#10637

Deque Generic LinkedList

1 Sekunde
128 Megabyte
Sehr leicht

Implement a generic Deque.

Implement the interface Dequeable<T>.

Implement the class MyDeque<T>, based on the LinkedList data structure, that implements the interface Dequeable<T>.

interface Dequeable<T>
{
  void push_front(T value);
  void push_back(T value);
  T pop_front();
  T pop_back();
  T front();
  T back();
  boolean Empty();
  int size();
}

class MyDeque<T> implements Dequeable<T>
{
  public LinkedList<T> s;
  ...
}

Eingabe

There is no input for this problem.

Ausgabe

There is no output for this problem.