0.10.0 • Published 8 years ago

algorithms v0.10.0

Weekly downloads
34
License
MIT
Repository
github
Last release
8 years ago

algorithms.js

Build Status Coverage Status Dependency Status devDependency Status Inline docs

npm.io

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

Geometry algorithms

require('algorithms/geometry');
// or
require('algorithms').Geometry;
  • BezierCurve

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
0.10.0

8 years ago

0.9.1

9 years ago

0.9.0

9 years ago

0.8.2

9 years ago

0.8.1

9 years ago

0.8.0

10 years ago

0.7.2

10 years ago

0.7.1

10 years ago

0.7.0

10 years ago

0.6.1

10 years ago

0.6.0

10 years ago

0.5.0

10 years ago

0.4.0

10 years ago

0.3.0

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago

0.0.1

10 years ago