A list of datastructures and algorithms I've personally written in JavaScript over my years of programming including:
- Algorithms to some javascript Inbuilt functions.
- Algorithms to some lodash functions.
- Algorithms to some common interview/coding challenges.
- Datastructures.
Some algorithms have different variant which will be listed below
Nb: All code can be found in the src folder "algorithms.js, "datastructure.js", "hashing-functions.js" files on the root of this repo, check file for more info and uses of algorithms
See full content below
Links referenced in files are courtesy of Frontend Masters instructors
This repo is open source, feel free to star, fork or contribute.
To contribute please read the CONTRIBUTING.md files on the root of this repo
git clone https://github.com/Nosa-Drexx/AlgoData.git # or 'git@github.com:Nosa-Drexx/AlgoData.git' for ssh
cd AlgoData
npm i # install packages
npm test # run tests
-
➡️ 🖨️ Algorithms
- ➡️ Map
- ➡️ isEven
- ➡️ isEven2
- ➡️ isPrime
- ➡️ isPrime2
- ➡️ isPrime3
- ➡️ delay
- ➡️ reverse
- ➡️ reverse2
- ➡️ lottery
- ➡️ isPalindrome
- ➡️ pipe2
- ➡️ filterIn
- ➡️ uniqueElemArr
- ➡️ uniqueArr2
- ➡️ reduceArr
- ➡️ reduceObj
- ➡️ mapWithExplicitReduceFunction
- ➡️ filterWithExplicitReduceFunction
- ➡️ curryN
- ➡️ compose
- ➡️ pipe
- ➡️ convertNumberToDifferentBase
- ➡️ concatAll
- ➡️ zip
- ➡️ bubbleSort
- ➡️ insertionSort
- ➡️ nestedAdd
- ➡️ factorial
- ➡️ factorial2
- ➡️ mergeSort
- ➡️ quickSort
- ➡️ radixSort
- ➡️ binarySearch
- ➡️ binarySearch2
- ➡️ linearSearch
- ➡️ preoder (preoder trevarsal through binary trees)
- ➡️ postorder (postorder trevarsal through binary trees)
- ➡️ inorder (inorder trevarsal through binary trees)
- ➡️ breadth (breadthfirst trevarsal through binary trees)
- ➡️ heapSort
- ➡️ connect (trevse through a graph; based on data in "testSite2.js")
- ➡️ hash1 (hashing functions)
- ➡️ hash2 (hashing functions)
- ➡️ hash3 (hashing functions)
- ➡️ _hash (hashing functions)
- ➡️ uniqueArr
- ➡️ uniqueArr3
- ➡️ preOrderTraverse
- ➡️ inOrderTraverse
- ➡️ postOrderTraverse
- ➡️ depthFirstTraversal
- ➡️ breadthFirstTraversal
- ➡️ sortArrayRandomly
- ➡️ isValidSubsequence
- ➡️ id
- ➡️ randomNumberBetween
- ➡️ fibonacciSeries
- ➡️ randomPasswordGen
- ➡️ MostOccuringNumberInAnArray
- ➡️ staircase
- ➡️ mergeMutate
- ➡️ divisibleSumPairs
- ➡️ sliceJS
- ➡️ joinJS
- ➡️ splitJS
- ➡️ factorsOf
- ➡️ LCM
- ➡️ HCF
- ➡️ someJS
- ➡️ everyJS
- ➡️ pushJS
- ➡️ fillJS
- ➡️ combination
- ➡️ permutation
- ➡️ allLetters
- ➡️ prefixCalc
- ➡️ postfixCalc
- ➡️ prefixCalc2
-
➡️ DataStructures
All dataStructures were implemented using JavaScript classes
- ➡️ ArrayList
- ➡️ Node
- ➡️ BloomFilter
- ➡️ Queue
- ➡️ Linkedlist
- ➡️ HashTable
- ➡️ BinaryTree
- ➡️ Graph
- ➡️ Stack