GithubHelp home page GithubHelp logo

rrrene / algorithms.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from felipernb/algorithms.js

0.0 3.0 0.0 648 KB

Atwood's Law applied to CS101 - Classic algorithms and data structures implemented in JavaScript

Home Page: http://algorithmsjs.org

License: MIT License

Makefile 0.49% JavaScript 99.51%

algorithms.js's Introduction

algorithms.js

Build Status Coverage Status Dependency Status devDependency Status

Atwood's Law applied to CS101.

Classic algorithms and data structures implemented in JavaScript, you know... FOR SCIENCE.

Installing

npm install --save algorithms

Contents

Data Structures

require('algorithms/data_structures');
// or
require('algorithms').DataStructures;
  • BST
  • Graph
  • HashTable
  • Heap
  • MinHeap
  • MaxHeap
  • LinkedList
  • PriorityQueue
  • Queue
  • Stack
  • Set (HashSet)
  • DisjointSetForest

Graph algorithms

require('algorithms/graph');
// or
require('algorithms').Graph;
  • topologicalSort
  • eulerPath
  • depthFirstSearch
  • breadthFirstSearch
Shortest path
  • bfsShortestPath
  • dijkstra
  • SPFA (Shortest Path Faster Algorithm)
  • bellmanFord
  • floydWarshall
Minimum spanning tree
  • prim
  • kruskal

Math algorithms

require('algorithms/math');
// or
require('algorithms').Math;
  • fibonacci
  • fisherYates
  • gcd (Greatest common divisor)
  • extendedEuclidean
  • newtonSqrt
  • reservoirSampling
  • fastPower
  • nextPermutation
  • powerSet
  • shannonEntropy

Search algorithms

require('algorithms/search');
// or
require('algorithms').Search;
  • bfs (breadth-first search for binary trees)
  • binarySearch
  • dfs (depth-first search for binary trees)
  • inOrder (default)
  • preOrder
  • postOrder

Sorting algorithms

require('algorithms/sorting');
// or
require('algorithms').Sorting;
  • bubbleSort
  • countingSort
  • heapSort
  • quicksort
  • selectionSort
  • radixSort
  • insertionSort
  • shellSort

String algorithms

require('algorithms/string');
// or
require('algorithms').String;
  • levenshtein
  • rabinKarp
  • knuthMorrisPratt
  • huffman
  • encode
  • decode
  • hamming
  • longestCommonSubsequence
  • longestCommonSubstring

algorithms.js's People

Contributors

anaran avatar brunorb avatar eush77 avatar felipernb avatar gauravmittal1995 avatar geakstr avatar gyj963 avatar liamgriffiths avatar lifebeyondfife avatar shuding avatar tayllan avatar

Watchers

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