public class DoubleLinkedList<T>
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DoubleLinkedList.Node<T> |
| Constructor and Description |
|---|
DoubleLinkedList() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
empty()
Time complexity: Θ(1)
|
DoubleLinkedList.Node<T> |
head() |
void |
insertBack(T value)
Time complexity: Θ(1)
|
void |
insertFront(T value)
Time complexity: Θ(1)
|
T |
removeBack()
Time complexity: Θ(1)
|
T |
removeFront()
Time complexity: Θ(1)
|
int |
size() |
DoubleLinkedList.Node<T> |
tail() |
public void insertFront(T value)
public void insertBack(T value)
public boolean empty()
public T removeFront() throws java.lang.Exception
java.lang.Exceptionpublic T removeBack() throws java.lang.Exception
java.lang.Exceptionpublic DoubleLinkedList.Node<T> head()
public DoubleLinkedList.Node<T> tail()
public int size()