struct-ts
v0.1.3
Published
data structures in typescript
Downloads
9
Maintainers
Readme
struct-ts
data structure library written in typescript
installation
npm
npm install struct-tsyarn
yarn add struct-tsusage
import { DoublyLinkedList } from 'struct-ts';
const dll = new DoublyLinkedList();
dll.push(1).pop().unshift(1).shift();library
DoublyLinkedList
of(arrayLike)
from(1, 2, 3)
push(1)
pop()
shift()
unshift(1)
insertBefore(node, 2)
insertAfter(node, 3)
remove(1)
removeNode(node)
find(1)
lengthStack
push(1)
pop()
peek()Queue
enqueue(1)
dequeue()
peek()
lengthBinarySearchTree
root
size
min()
max()
search(1, tree.root)
insert(1, 100, tree.root)
delete(1, tree.root)
traverse(console.log)