data structure library written in typescript
npm
npm install struct-ts
yarn
yarn add struct-ts
import { DoublyLinkedList } from 'struct-ts';
const dll = new DoublyLinkedList();
dll.push(1).pop().unshift(1).shift();
const { DoublyLinkedList } = require('struct-ts')
const dll = new DoublyLinkedList();
dll.push(1).pop().unshift(1).shift();
of(arrayLike)
from(1, 2, 3)
push(1)
pop()
shift()
unshift(1)
insertBefore(node, 2)
insertAfter(node, 3)
remove(1)
removeNode(node)
find(1)
head
tail
length
push(1)
pop()
peek()
enqueue(1)
dequeue()
peek()
length
root
size
min()
max()
search(1)
insert(1, 100)
delete(1)
traverse(()=>{})