MCPcopy Create free account

hub / github.com/TheAlgorithms/JavaScript / functions

Functions925 in github.com/TheAlgorithms/JavaScript

↓ 160 callersMethodpush
(value)
Data-Structures/Stack/Stack.js:20
↓ 63 callersMethodaddLast
(element)
Data-Structures/Linked-List/SinglyLinkedList.js:57
↓ 56 callersMethodget
* @param {string} key * @returns {*}
Cache/LRUCache.js:90
↓ 53 callersMethodget
()
Data-Structures/Linked-List/SinglyLinkedList.js:239
↓ 50 callersMethodadd
(data)
Data-Structures/Linked-List/SinglyCircularLinkedList.js:44
↓ 46 callersMethodpush
* Adds an element to the queue * @param {*} key * @param {number} priority
Data-Structures/Heap/KeyPriorityQueue.js:45
↓ 37 callersMethodtoString
* @param {number} indent * @returns {JSON} - string
Cache/LRUCache.js:129
↓ 30 callersMethodset
* @param {string} key * @param {*} value
Cache/LRUCache.js:76
↓ 29 callersFunctiondecExp
(a, b, base = 10, exp = [], d = {}, dlen = 0)
Maths/DecimalExpansion.js:23
↓ 28 callersFunctionFibonacciMatrixExpo
(num)
Maths/Fibonacci.js:161
↓ 28 callersMethodadd
* Vector addition * * @param vector The vector to be added. * @returns The sum-vector.
Recursive/KochSnowflake.js:29
↓ 28 callersFunctioncheckExceeding
(str)
String/CheckExceeding.js:9
↓ 25 callersFunctionQuickSelect
* [QuickSelect](https://www.geeksforgeeks.org/quickselect-algorithm/) is an algorithm to find the kth smallest number * * Notes: * -QuickSelect is
Data-Structures/Array/QuickSelect.js:14
↓ 25 callersMethodhas
* @param {string} key * @returns {*}
Cache/LRUCache.js:66
↓ 23 callersFunctiongetNextElementaryGeneration
(generation, rule)
Cellular-Automata/Elementary.js:67
↓ 22 callersFunctionagm
(a, g)
Maths/ArithmeticGeometricMean.js:10
↓ 21 callersMethodindexOf
(element)
Data-Structures/Linked-List/SinglyLinkedList.js:147
↓ 21 callersMethodlog
()
Data-Structures/Linked-List/SinglyLinkedList.js:285
↓ 21 callersMethodpop
()
Data-Structures/Stack/Stack.js:26
↓ 20 callersFunctionoutput
(val)
Data-Structures/Tree/test/BinarySearchTree.test.js:25
↓ 19 callersMethodaddEdge
(vertex1, vertex2)
Data-Structures/Graph/Graph.js:14
↓ 19 callersFunctionisNumber
(number, noName = 'number')
Maths/Volume.js:115
↓ 18 callersFunctionconvertToInt
(input)
Conversions/RgbHsvConversion.js:98
↓ 18 callersFunctionvalidateNumericParam
(param, paramName = 'param')
Maths/Area.js:165
↓ 17 callersFunctioncheckAnagramMap
(str1, str2)
String/CheckAnagram.js:41
↓ 17 callersFunctioncheckAnagramRegex
(str1, str2)
String/CheckAnagram.js:11
↓ 17 callersMethodfind
* TO check is a particular element exists or not * @param {any} _val * @returns {Boolean} exists or not
Data-Structures/Tree/AVLTree.js:65
↓ 17 callersFunctionlongestCommonSubsequence
* Finds length of the longest common subsequence among the two input string * @param {string} str1 Input string #1 * @param {string} str2 Input stri
Dynamic-Programming/LongestCommonSubsequence.js:30
↓ 16 callersMethodenqueue
* @description - Add a value to the end of the queue * @param {*} data * @returns {number} - The current size of queue
Data-Structures/Queue/Queue.js:29
↓ 15 callersMethodappend
(element)
Data-Structures/Linked-List/DoublyLinkedList.js:17
↓ 15 callersFunctionbucketSort
(list, size)
Sorts/BucketSort.js:20
↓ 15 callersFunctioncombSort
* combSort returns an array of numbers sorted in increasing order. * * @param {number[]} list The array of numbers to sort. * @return {number[]} Th
Sorts/CombSort.js:25
↓ 15 callersFunctioncycleSort
* cycleSort takes an input array of numbers and returns the array sorted in increasing order. * * @param {number[]} list An array of numbers to be s
Sorts/CycleSort.js:17
↓ 15 callersMethodisEmpty
()
Data-Structures/Linked-List/SinglyLinkedList.js:52
↓ 14 callersFunctionFindMinIterator
(_iterable, _selector = undefined)
Maths/FindMinIterator.js:6
↓ 14 callersMethod_getPriorityOrInfinite
(position)
Data-Structures/Heap/KeyPriorityQueue.js:98
↓ 14 callersFunctionfactorial
(n)
Recursive/Factorial.js:11
↓ 14 callersFunctionmean
(numbers)
Maths/AverageMean.js:12
↓ 13 callersFunctionisLeapYear
(year)
Maths/LeapYear.js:16
↓ 13 callersFunctionisPalindromeIterative
(x)
String/IsPalindrome.js:19
↓ 13 callersMethodreverse
()
Data-Structures/Linked-List/SinglyLinkedList.js:290
↓ 13 callersMethodsearch
(val)
Data-Structures/Tree/BinarySearchTree.js:24
↓ 13 callersMethodsize
()
Data-Structures/Linked-List/SinglyLinkedList.js:37
↓ 12 callersFunctionabs
(num)
Maths/Abs.js:12
↓ 12 callersMethodaddVertex
(vertex)
Data-Structures/Graph/Graph.js:6
↓ 12 callersFunctionbubbleSort
(items)
Sorts/BubbleSort.js:19
↓ 12 callersMethodequalsApproximately
* Check for approximate vector equality. * * @param vector The vector to compare to. * @param epsilon The allowed discrepancy for the x-value
Data-Structures/Vectors/Vector2.js:31
↓ 12 callersMethodinsert
* Inserts a new value into the heap. * @param {*} value - The value to be inserted into the heap.
Data-Structures/Heap/BinaryHeap.js:32
↓ 12 callersFunctiontitleCaseConversion
(inputString)
Conversions/TitleCaseConversion.js:13
↓ 11 callersMethodaddFirst
(element)
Data-Structures/Linked-List/SinglyLinkedList.js:71
↓ 11 callersFunctioncountVowels
(str)
String/CountVowels.js:10
↓ 11 callersFunctionencrypt
* Encrypt a Affine Cipher * @param {String} str - String to be encrypted * @param {Number} a - A coefficient * @param {Number} b - B coefficient *
Ciphers/AffineCipher.js:72
↓ 11 callersFunctionexpectPositive
(word, abbr)
Dynamic-Programming/tests/Abbreviation.test.js:3
↓ 11 callersMethodhead
()
Data-Structures/Linked-List/SinglyLinkedList.js:42
↓ 11 callersMethodinsert
(position, element)
Data-Structures/Linked-List/DoublyLinkedList.js:33
↓ 11 callersFunctionintToBase
(number, base)
Maths/IntToBase.js:15
↓ 11 callersFunctionisPalindromeIntegerNumber
(x)
Maths/isPalindromeIntegerNumber.js:9
↓ 11 callersFunctionlengthOfLongestSubstring
(s)
String/LengthofLongestSubstringWithoutRepetition.js:10
↓ 11 callersMethodremove
(word, count)
Data-Structures/Tree/Trie.js:67
↓ 10 callersMethodaddEdge
(node1, node2)
Graphs/Kosaraju.js:30
↓ 10 callersFunctionapproximatelyEqualHsv
(hsv1, hsv2)
Conversions/RgbHsvConversion.js:84
↓ 10 callersFunctionhexToBinary
(hexString)
Conversions/HexToBinary.js:21
↓ 10 callersFunctionhsvToRgb
(hue, saturation, value)
Conversions/RgbHsvConversion.js:19
↓ 10 callersFunctionlevenshteinDistance
(a, b)
String/LevenshteinDistance.js:12
↓ 10 callersFunctionparityOutlier
(integers)
Maths/ParityOutlier.js:9
↓ 10 callersFunctionrgbToHsv
(red, green, blue)
Conversions/RgbHsvConversion.js:48
↓ 10 callersFunctionupperCaseConversion
(inputString)
Conversions/UpperCaseConversion.js:18
↓ 9 callersFunctionROT13
* @function ROT13 * @description - ROT13 ("rotate by 13 places", sometimes hyphenated ROT-13) is a simple letter substitution cipher that replaces a
Ciphers/ROT13.js:8
↓ 9 callersFunctionconvertArbitraryBase
( stringInBaseOne, baseOneCharacterString, baseTwoCharacterString )
Conversions/ArbitraryBase.js:21
↓ 9 callersMethoddelete
()
Data-Structures/Heap/MinPriorityQueue.js:112
↓ 8 callersFunctionAtbash
(str)
Ciphers/Atbash.js:8
↓ 8 callersFunctionBinaryCountSetBits
(a)
Bit-Manipulation/BinaryCountSetBits.js:10
↓ 8 callersFunctionReverseStringIterative
* A short example showing how to reverse a string.
String/ReverseString.js:4
↓ 8 callersFunctionXORCipher
(str, key)
Ciphers/XORCipher.js:12
↓ 8 callersMethodaddValue
(val)
Data-Structures/Tree/BinarySearchTree.js:141
↓ 8 callersFunctionalphaNumericPalindrome
(str)
String/AlphaNumericPalindrome.js:17
↓ 8 callersFunctiondiceCoefficient
(stringA, stringB)
String/DiceCoefficient.js:33
↓ 8 callersFunctionfindMaxRecursion
* @function findMaxRecursion * @description This algorithm will find the maximum value of a array of numbers. * * @param {Integer[]} arr Array of n
Maths/FindMaxRecursion.js:17
↓ 8 callersMethodgetHead
()
Data-Structures/Linked-List/DoublyLinkedList.js:192
↓ 8 callersMethodinitiateNodeAndIndex
()
Data-Structures/Linked-List/SinglyLinkedList.js:32
↓ 8 callersFunctioniterate
(initialVectors, steps)
Recursive/KochSnowflake.js:84
↓ 8 callersMethodpop
* Removes the element with least priority * @returns the key of the element with least priority
Data-Structures/Heap/KeyPriorityQueue.js:55
↓ 8 callersMethodremoveAt
(index)
Data-Structures/Linked-List/SinglyLinkedList.js:199
↓ 8 callersMethodremoveFirst
()
Data-Structures/Linked-List/SinglyLinkedList.js:85
↓ 7 callersFunctionCoPrimeCheck
(firstNumber, secondNumber)
Maths/CoPrimeCheck.js:21
↓ 7 callersFunctionNumberOfLocalMaximumPoints
(A)
Data-Structures/Array/NumberOfLocalMaximumPoints.js:42
↓ 7 callersFunctioncaesarCipher
(str, rotation)
Ciphers/CaesarCipher.js:9
↓ 7 callersFunctionchange
(coins, amount)
Dynamic-Programming/CoinChange.js:5
↓ 7 callersFunctioncoinChangeMin
(coins, amount)
Dynamic-Programming/CoinChange.js:22
↓ 7 callersFunctioncountSubstrings
(str, substring)
String/CountSubstrings.js:11
↓ 7 callersFunctiondecrypt
* Decrypt a Affine Cipher * @param {String} str - String to be decrypted * @param {Number} a - A coefficient * @param {Number} b - B coefficient *
Ciphers/AffineCipher.js:91
↓ 7 callersFunctionextendedEuclideanGCD
(arg1, arg2)
Maths/ExtendedEuclideanGCD.js:27
↓ 7 callersMethodextractTop
* Removes and returns the top element of the heap. * @returns {*} - The top element of the heap.
Data-Structures/Heap/BinaryHeap.js:109
↓ 7 callersFunctionfermatPrimeCheck
(n, numberOfIterations = 50)
Maths/FermatPrimalityTest.js:77
↓ 7 callersFunctionfibonacci
(N)
Dynamic-Programming/FibonacciNumber.js:8
↓ 7 callersMethodgetElementAt
(index)
Data-Structures/Linked-List/SinglyCircularLinkedList.js:23
↓ 7 callersMethodisEmpty
* @description - Return is queue empty or not * @returns {boolean}
Data-Structures/Queue/Queue.js:109
↓ 7 callersFunctionlower
(str)
String/Lower.js:10
↓ 7 callersFunctionpalindrome
(str)
Recursive/Palindrome.js:9
↓ 7 callersFunctionselectionSort
(list)
Sorts/SelectionSort.js:11
next →1–100 of 925, ranked by callers