Coder Social home page Coder Social logo

loganfreeman / algorithms.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from felipernb/algorithms.js

0.0 2.0 0.0 1.83 MB

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

Home Page: http://algorithmsjs.org

License: MIT License

Makefile 0.37% JavaScript 99.63%

algorithms.js's Introduction

algorithms.js

Build Status Coverage Status Dependency Status devDependency Status Inline docs

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
  • DisjointSetForest
  • FenwickTree
  • Graph
  • HashTable
  • Heap
  • MaxHeap
  • MinHeap
  • LinkedList
  • PriorityQueue
  • Queue
  • Set (HashSet)
  • Stack

Graph algorithms

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

Math algorithms

require('algorithms/math');
// or
require('algorithms').Math;
  • collatzConjecture
  • extendedEuclidean
  • fastPower
  • fibonacci
  • fisherYates
  • gcd (Greatest common divisor)
  • greatestDifference
  • lcm (Least common multiple)
  • newtonSqrt
  • nextPermutation
  • powerSet
  • reservoirSampling
  • 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)
  • postOrder
  • preOrder

Sorting algorithms

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

String algorithms

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

algorithms.js's People

Contributors

felipernb avatar eush77 avatar evandroeisinger avatar shuding avatar anaran avatar tayllan avatar gibatronic avatar juanplopes avatar lifebeyondfife avatar guliash avatar liamgriffiths avatar brunorb avatar filipefalcaos avatar gauravmittal1995 avatar rrrene avatar geakstr avatar gyj963 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.