Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
JS-DSA is a comprehensive collection of data structures and algorithms implemented in JavaScript. This project is designed to be a helpful resource for developers, students, and anyone interested in learning about data structures and algorithms through pr
JS-DSA is a comprehensive collection of data structures and algorithms implemented in JavaScript. This project is designed to be a helpful resource for developers, students, and anyone interested in learning about data structures and algorithms through practical JavaScript examples.
You can install JS-DSA using either npm or yarn. First, clone the repository to your local machine:
git clone https://github.com/pb2204/JS-DSA.git
cd JS-DSA
npm install adv-dsa
yarn add adv-dsa
JS-DSA provides a wide range of data structures and algorithms. You can utilize them by importing the necessary classes into your JavaScript projects.
// Example of using a Stack from the data structures module
const { Stack } = require('./data-structures/stacks-and-queues/Stack');
const stack = new Stack();
stack.push(1);
stack.push(2);
stack.push(3);
console.log(stack.pop()); // Outputs: 3
For detailed information on how to use each data structure and algorithm, consult the LEARN.md
document in this repository.
Let's look at some practical examples of using JS-DSA classes:
const binarySearch = require('adv-dsa').BinarySearch;
const sortedArray = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
const target = 5;
const index = binarySearch(sortedArray, target);
console.log(`Index of ${target} is ${index}`);
const quickSort = require('adv-dsa').QuickSort;
const unsortedArray = [3, 6, 8, 10, 1, 2, 1];
const sortedArray = quickSort(unsortedArray);
console.log(sortedArray);
This project is open-source and available under the MIT License.
For developers who want to contribute to this project or want to report issues, please refer to the CONTRIBUTING.md guide.
Please follow our Code of Conduct to foster an open and welcoming environment for everyone.
Check out the LEARN.md file for learning resources related to data structures and algorithms.
Feel free to contribute, provide feedback, and help us improve this project for the community!
FAQs
JS-DSA is a comprehensive collection of data structures and algorithms implemented in JavaScript. This project is designed to be a helpful resource for developers, students, and anyone interested in learning about data structures and algorithms through pr
We found that adv-dsa 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.