Template Class DequeWithLinkedList

Class Documentation

template<typename T>
class DequeWithLinkedList

Deque with linked list class with all related functionality.

Template Parameters:

T – The type of the implementation class.

Public Functions

inline void add_first(const T &element)

Adds an element to the front of the deque.

Parameters:

element – The element to be added.

inline void add_last(const T &element)

Adds an element to the back of the deque.

Parameters:

element – The element to be added.

inline T del_first()

Deletes the element at the front of the deque.

Returns:

The deleted element from the front.

inline T del_last()

Deletes the element at the back of the deque.

Returns:

The deleted element from the back.

inline T peek_first() const

Gets the value of the element at the front of the deque.

Returns:

The value of the element at the front of the deque.

inline T peek_last() const

Gets the value of the element at the back of the deque.

Returns:

The value of the element at the back of the deque.