Data structure is a way of organizing and storing data in a computer so that it can be accessed and used efficiently, A simple JavaScript library providing commonly used data structures.
This library offers a collection of fundamental data structures implemented in JavaScript. These data structures are essential for various algorithms and applications, offering efficient ways to organize and manipulate data.
-
Array:
- A collection of elements identified by index or key.
-
Graph:
- A collection of nodes connected by edges.
-
HashTable:
- A data structure that maps keys to values for efficient lookup.
-
Heap:
- A specialized tree-based data structure where the parent node is greater (or smaller) than its children.
-
LinkedList:
- A linear collection of elements where each element points to the next one in the sequence.
-
Map:
- A collection of key-value pairs where each key must be unique.
-
Queue:
- A First In, First Out (FIFO) data structure, where the first added element is the first one to be removed.
-
Recursion:
- A programming technique where a function calls itself to solve a smaller instance of the problem.
-
Search Algorithms:
- Common algorithms like Binary Search, Linear Search, etc.
-
Set:
- A collection of unique elements.
-
Sort Algorithms:
- Common sorting algorithms like Bubble Sort, Merge Sort, Quick Sort, etc.
-
Stack:
- A Last In, First Out (LIFO) data structure, where the last added element is the first one to be removed.
-
String:
- A sequence of characters.
-
Tree:
- A hierarchical data structure with a root element and subtrees.
-
Trie:
- A tree-like data structure where the keys are usually strings.
In the terminal, use the following command:
git clone https://github.com/mhdafs/datastructure.git