|
linked list
|
Public 成员函数 | |
| LinkedList () | |
| ~LinkedList () | |
| unsigned int | size () |
| void | insertTail (T x) |
| void | traversal () |
| bool | isEmpty () |
| ListElement< T > * | find (T x) |
| void | remove (T x) |
| void | insert (T x, ListElement< T > *p) |
| void | insertHead (T x) |
| LinkedList< T >::LinkedList | ( | ) |
The constructor
| LinkedList< T >::~LinkedList | ( | ) |
The destructor
| ListElement< T > * LinkedList< T >::find | ( | T | x | ) |
Find the first one which its data is x.
| void LinkedList< T >::insert | ( | T | x, |
| ListElement< T > * | p | ||
| ) |
Create a node and insert it to the next of p.
Create a new node and insert it to the head
| bool LinkedList< T >::isEmpty | ( | ) |
Check whether the list is empty.
| void LinkedList< T >::traversal | ( | ) |
Traverse and print the nodes