![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
data-structures-playground
Advanced tools
Implementation of the most common data structures in Javascript
Implementation of the most common data structures in Javascript (ES6+), including linear and non-linear ones, such as Array
, Linked List
, Queue
, Stack
and Binary Tree
.
Futhermore, you will find here implementation of some interesting algorithms like Quick Sort
for sorting arrays and Breadth First Search
or Depth First Search (inOrder, preOrder, postOrder)
for binary trees.
npm i data-structures-playground
After clone this repository you will need to run npm i
to install all dependencies.
import {
Array,
LinkedList,
Queue,
Stack,
} from 'data-structures-playground/src/modules/linear-data-structures/linear-data-structures.module.js';
import { BinaryTree } from 'data-structures-playground/src/modules/non-linear-data-structures/non-linear-data-structures.module.js';
data structures
(examples).const array = new Array();
array.push(10);
array.push(6);
array.push(2);
array.sort();
console.log(array.toString());
const linkedList = new LinkedList();
linkedList.prepend(444);
linkedList.append(3);
linkedList.insert(1, 22);
linkedList.delete(0);
console.log(linkedList.get());
const queue = new Queue();
queue.enqueue(1);
queue.enqueue(2);
queue.enqueue(3);
queue.enqueue(4);
queue.enqueue(5);
queue.dequeue();
queue.dequeue();
let currentQueueItem = queue.peek();
while (currentQueueItem) {
console.log(currentQueueItem.value);
currentQueueItem = currentQueueItem.next;
}
const stack = new Stack();
stack.push(1);
stack.push(2);
stack.push(3);
stack.push(4);
stack.push(5);
stack.pop();
stack.pop();
let currentStackItem = stack.peek();
while (currentStackItem) {
console.log(currentStackItem.value);
currentStackItem = currentStackItem.next;
}
const binaryTree = new BinaryTree();
binaryTree.insert(5);
binaryTree.insert(9);
binaryTree.insert(6);
binaryTree.insert(2);
binaryTree.insert(4);
binaryTree.insert(3);
binaryTree.insert(8);
console.log(binaryTree.breadthFirstSearch());
To run this application you will need only run npm run serve
.
An initial data structure will be generated when the application starts off. Then you can manipulate this data structure inserting information in the inputs and choosing an action by the buttons.
ARRAY
Quick sort
algorithm.string
format.n
value greater than zero in the quantity to delete
argument, it will delete the n
elements after the provided index and replace the value instead of them.LINKED LIST
head
.tail
.QUEUE
STACK
BINARY TREE
Breadth First Search
algorithm.Depth First Search
algorithm using the approach provided by the type argument (it can be inOrder
, preOrder
or postOrder
).Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
FAQs
Implementation of the most common data structures in Javascript
The npm package data-structures-playground receives a total of 2 weekly downloads. As such, data-structures-playground popularity was classified as not popular.
We found that data-structures-playground demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.