Coder Social home page Coder Social logo

fasibaag / dsa.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from amejiarosario/dsa.js-data-structures-algorithms-javascript

0.0 2.0 0.0 93.4 MB

Data Structures and Algorithms using JavaScript

Home Page: https://gum.co/dsajs

License: MIT License

JavaScript 99.77% Ruby 0.23%

dsa.js's Introduction

Data Structures and Algorithms in JavaScript

Build Status npm version

This repository covers the implementation of the classical algorithms and data structures in JavaScript.

Usage

You can clone the repo or install the code from NPM:

npm install dsa.js

and then you can import it into your programs or CLI

const { LinkedList, Queue, Stack } = require('dsa.js');

For a full list of all the exposed data structures and algorithms see.

Book

You can check out the dsa.js book that goes deeper into each topic and provide additional illustrations and explanations.

  • Algorithmic toolbox to avoid getting stuck while coding.
  • Explains data structures similarities and differences.
  • Algorithm analysis fundamentals (Big O notation, Time/Space complexity) and examples.
  • Time/space complexity cheatsheet.

dsajs algorithms javascript book

The book text is available to read here:

  1. Algorithms Analysis
  2. Linear Data Structures
  3. Non-Linear Data Structures
  4. Algorithmic Techniques

Data Structures

We are covering the following data structures.

Interactive Data Structures

Linear Data Structures

  1. Arrays: Built-in in most languages so not implemented here. Post.

  2. Linked Lists: each data node has a link to the next (and previous). Code | Post.

  3. Queue: data flows in a "first-in, first-out" (FIFO) manner. Code | Post

  4. Stacks: data flows in a "last-in, first-out" (LIFO) manner. Code | Post.

Non-Linear Data Structures

  1. Trees: data nodes has zero or more adjacent nodes a.k.a. children. Each node can only have one parent node otherwise is a graph not a tree. Code | Post

    1. Binary Trees: same as tree but only can have two children at most. Code | Post

    2. Binary Search Trees (BST): same as binary tree, but the nodes value keep this order left < parent < rigth. Code | Post

    3. AVL Trees: Self-balanced BST to maximize look up time. Code | Post

    4. Red-Black Trees: Self-balanced BST more loose than AVL to maximize insertion speed. Code

  2. Maps: key-value store.

    1. Hash Maps: implements map using a hash function. Code | Post

    2. Tree Maps: implement map using a self-balanced BST. Code

  3. Graphs: data nodes that can have a connection or edge to zero or more adjacent nodes. Unlike trees, nodes can have multiple parents, loops. Code | Post

Algorithms

  • Sorting algorithms

  • Greedy Algorithms

    • Fractional Knapsack Problem. Code
  • Divide and Conquer

    • Fibonacci Numbers. Code
  • Dynamic Programming

    • Fibonacci with memoization. Code
  • Backtracking algorithms

    • Word permutations. Code

dsa.js's People

Contributors

amejiarosario avatar ivanji avatar

Watchers

James Cloos avatar  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.