Node
The Node class is the basic unit of data structure. You can use it to implement various data structures.
value
The value of the node
next
The next node
Example
ts
import { Node } from '@jaydenlee/mini-data-structure';
const node = new Node(1);
console.log(node.value); // 1
console.log(node.next); // null
import { Node } from '@jaydenlee/mini-data-structure';
const node = new Node(1);
console.log(node.value); // 1
console.log(node.next); // null