linked list
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
LinkedList< T > 模板类 参考

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()

template<class T >
LinkedList< T >::LinkedList ( )

The constructor

◆ ~LinkedList()

template<class T >
LinkedList< T >::~LinkedList ( )

The destructor

成员函数说明

◆ find()

template<class T >
ListElement< T > * LinkedList< T >::find ( T  x)

Find the first one which its data is x.

◆ insert()

template<class T >
void LinkedList< T >::insert ( T  x,
ListElement< T > *  p 
)

Create a node and insert it to the next of p.

◆ insertHead()

template<class T >
void LinkedList< T >::insertHead ( T  x)

Create a new node and insert it to the head

◆ insertTail()

template<class T >
void LinkedList< T >::insertTail ( T  x)

Create a new node and insert it to tail.

◆ isEmpty()

template<class T >
bool LinkedList< T >::isEmpty ( )

Check whether the list is empty.

◆ remove()

template<class T >
void LinkedList< T >::remove ( T  x)

Remove the first one which its data is x.

◆ size()

template<class T >
unsigned int LinkedList< T >::size ( )

Get the size of current list.

◆ traversal()

template<class T >
void LinkedList< T >::traversal ( )

Traverse and print the nodes


该类的文档由以下文件生成: