npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

adv-dsa

v1.1.5

Published

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

Downloads

20

Readme

JS-DSA :: JavaScript Data Structures and Algorithms

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.

Table of Contents

Installation

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

Using npm

npm install adv-dsa

Using yarn

yarn add adv-dsa

Usage

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.

Practical Examples

Let's look at some practical examples of using JS-DSA classes:

Example 1: Binary Search

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}`);

Example 2: QuickSort

const quickSort = require('adv-dsa').QuickSort;

const unsortedArray = [3, 6, 8, 10, 1, 2, 1];
const sortedArray = quickSort(unsortedArray);

console.log(sortedArray);

License

This project is open-source and available under the MIT License.

Contribution Details

For developers who want to contribute to this project or want to report issues, please refer to the CONTRIBUTING.md guide.

Code of Conduct

Please follow our Code of Conduct to foster an open and welcoming environment for everyone.

Learning Resources

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!

Developer Details

Happy Coding !!!