Giter VIP home page Giter VIP logo

northeastdev / js-dsa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pb2204/js-dsa

0.0 0.0 0.0 173 KB

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.

Home Page: https://www.npmjs.com/package/adv-dsa

License: MIT License

JavaScript 100.00%

js-dsa's Introduction

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('adv-dsa').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 !!!

js-dsa's People

Contributors

pb2204 avatar kanai2003 avatar surieya avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.