Skip to content

Node

Defined in: node.ts:7

Represents a node in a bidirectional chain structure with optional child nodes. This node can be used to create various linked data structures.

Type ParameterDescription
TThe type of value stored in the node.

new Node<T>(): Node<T>

Defined in: node.ts:24

Creates a new Node instance. Initializes value, next, and prev properties to null.

Node<T>

next: null | Node<T>

Defined in: node.ts:9

Reference to the next node in the sequence.


prev: null | Node<T>

Defined in: node.ts:12

Reference to the previous node in the sequence.


value: null | T

Defined in: node.ts:15

The value stored in this node.

get siblings(): Node<T>[]

Defined in: node.ts:63

Gets the siblings of this node.

Node<T>[]

An array of Node representing all subsequent nodes in the sequence.

set siblings(arr): void

Defined in: node.ts:47

Sets the siblings of this node. Establishes bidirectional links between adjacent nodes in the provided array.

ParameterTypeDescription
arrNode<T>[]An array of Node to set as siblings.

void