Template Class QueueWithLinkedList

Class Documentation

template<typename T>
class QueueWithLinkedList

Queue with linked list class and all related functionality.

Template Parameters:

T – Type of the implementation class.

Public Functions

inline void push(const T &element)

Pushes the element at the back of the queue.

Parameters:

element – The element to be pushed.

inline T pop()

Pops the element from the front of the queue and returns its value.

Returns:

The value of the popped element.

inline T peek() const

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

Returns:

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

inline size_t size() const

Gets the size of the queue.

Returns:

The current size of the queue.