@keagan1998/js-dsa
v1.0.7
Published
Data Structures and Algorithms implemented in JavaScript
Downloads
12
Maintainers
Readme
Data Structures Implemented in JavaScript
List of Implemented Data Structures:
- Stack
- Queue / Priority Queue
- Linked List (Singly)
- Binary Tree
- Array Utils
Available Methods:
Stack
- push()
- pop()
- peek()
- isEmpty()
Queue / Priority Queue
- enqueue()
- dequeue()
- top()
- isEmpty()
Linked List (Singly)
- add()
- insertAt()
- removeAt()
- printList()
- reverse()
- reverseRecursive()
- detectLoop()
- deleteList()
- traverse()
Binary Tree
- preOrderTraversal()
- inOrderTraversal()
- postOrderTraversal()
- levelOrderTraversal()
- height()
- insertInLevelOrder()
- deleteNode()
Array Utils
- selectionSort()
- bubbleSort()
- insertionSort()
- quickSort()
- mergeSort()
Installation
npm i @keagan1998/js-dsa
How to use,
const { PriorityQueue, BinaryTree, ArrayUtils } = require('@keagan1998/js-dsa');