Struct DoublyLinkedList::Node

Nested Relationships

This struct is a nested type of Template Class DoublyLinkedList.

Struct Documentation

struct Node

Struct representing a node in a doubly linked list.

Public Functions

inline Node(T val)

Constructs a new node with the given data and initializes prev and next to nullptr.

Parameters:

val – The value of the data to store in the node.

Public Members

T data

The data stored in the node.

Node *prev

Pointer to the previous node.

Node *next

Pointer to the next node.