Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TheAlgorithms/JavaScript
/ functions
Functions
925 in github.com/TheAlgorithms/JavaScript
⨍
Functions
925
◇
Types & classes
114
↓ 160 callers
Method
push
(value)
Data-Structures/Stack/Stack.js:20
↓ 63 callers
Method
addLast
(element)
Data-Structures/Linked-List/SinglyLinkedList.js:57
↓ 56 callers
Method
get
* @param {string} key * @returns {*}
Cache/LRUCache.js:90
↓ 53 callers
Method
get
()
Data-Structures/Linked-List/SinglyLinkedList.js:239
↓ 50 callers
Method
add
(data)
Data-Structures/Linked-List/SinglyCircularLinkedList.js:44
↓ 46 callers
Method
push
* Adds an element to the queue * @param {*} key * @param {number} priority
Data-Structures/Heap/KeyPriorityQueue.js:45
↓ 37 callers
Method
toString
* @param {number} indent * @returns {JSON} - string
Cache/LRUCache.js:129
↓ 30 callers
Method
set
* @param {string} key * @param {*} value
Cache/LRUCache.js:76
↓ 29 callers
Function
decExp
(a, b, base = 10, exp = [], d = {}, dlen = 0)
Maths/DecimalExpansion.js:23
↓ 28 callers
Function
FibonacciMatrixExpo
(num)
Maths/Fibonacci.js:161
↓ 28 callers
Method
add
* Vector addition * * @param vector The vector to be added. * @returns The sum-vector.
Recursive/KochSnowflake.js:29
↓ 28 callers
Function
checkExceeding
(str)
String/CheckExceeding.js:9
↓ 25 callers
Function
QuickSelect
* [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 callers
Method
has
* @param {string} key * @returns {*}
Cache/LRUCache.js:66
↓ 23 callers
Function
getNextElementaryGeneration
(generation, rule)
Cellular-Automata/Elementary.js:67
↓ 22 callers
Function
agm
(a, g)
Maths/ArithmeticGeometricMean.js:10
↓ 21 callers
Method
indexOf
(element)
Data-Structures/Linked-List/SinglyLinkedList.js:147
↓ 21 callers
Method
log
()
Data-Structures/Linked-List/SinglyLinkedList.js:285
↓ 21 callers
Method
pop
()
Data-Structures/Stack/Stack.js:26
↓ 20 callers
Function
output
(val)
Data-Structures/Tree/test/BinarySearchTree.test.js:25
↓ 19 callers
Method
addEdge
(vertex1, vertex2)
Data-Structures/Graph/Graph.js:14
↓ 19 callers
Function
isNumber
(number, noName = 'number')
Maths/Volume.js:115
↓ 18 callers
Function
convertToInt
(input)
Conversions/RgbHsvConversion.js:98
↓ 18 callers
Function
validateNumericParam
(param, paramName = 'param')
Maths/Area.js:165
↓ 17 callers
Function
checkAnagramMap
(str1, str2)
String/CheckAnagram.js:41
↓ 17 callers
Function
checkAnagramRegex
(str1, str2)
String/CheckAnagram.js:11
↓ 17 callers
Method
find
* TO check is a particular element exists or not * @param {any} _val * @returns {Boolean} exists or not
Data-Structures/Tree/AVLTree.js:65
↓ 17 callers
Function
longestCommonSubsequence
* 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 callers
Method
enqueue
* @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 callers
Method
append
(element)
Data-Structures/Linked-List/DoublyLinkedList.js:17
↓ 15 callers
Function
bucketSort
(list, size)
Sorts/BucketSort.js:20
↓ 15 callers
Function
combSort
* 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 callers
Function
cycleSort
* 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 callers
Method
isEmpty
()
Data-Structures/Linked-List/SinglyLinkedList.js:52
↓ 14 callers
Function
FindMinIterator
(_iterable, _selector = undefined)
Maths/FindMinIterator.js:6
↓ 14 callers
Method
_getPriorityOrInfinite
(position)
Data-Structures/Heap/KeyPriorityQueue.js:98
↓ 14 callers
Function
factorial
(n)
Recursive/Factorial.js:11
↓ 14 callers
Function
mean
(numbers)
Maths/AverageMean.js:12
↓ 13 callers
Function
isLeapYear
(year)
Maths/LeapYear.js:16
↓ 13 callers
Function
isPalindromeIterative
(x)
String/IsPalindrome.js:19
↓ 13 callers
Method
reverse
()
Data-Structures/Linked-List/SinglyLinkedList.js:290
↓ 13 callers
Method
search
(val)
Data-Structures/Tree/BinarySearchTree.js:24
↓ 13 callers
Method
size
()
Data-Structures/Linked-List/SinglyLinkedList.js:37
↓ 12 callers
Function
abs
(num)
Maths/Abs.js:12
↓ 12 callers
Method
addVertex
(vertex)
Data-Structures/Graph/Graph.js:6
↓ 12 callers
Function
bubbleSort
(items)
Sorts/BubbleSort.js:19
↓ 12 callers
Method
equalsApproximately
* 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 callers
Method
insert
* Inserts a new value into the heap. * @param {*} value - The value to be inserted into the heap.
Data-Structures/Heap/BinaryHeap.js:32
↓ 12 callers
Function
titleCaseConversion
(inputString)
Conversions/TitleCaseConversion.js:13
↓ 11 callers
Method
addFirst
(element)
Data-Structures/Linked-List/SinglyLinkedList.js:71
↓ 11 callers
Function
countVowels
(str)
String/CountVowels.js:10
↓ 11 callers
Function
encrypt
* 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 callers
Function
expectPositive
(word, abbr)
Dynamic-Programming/tests/Abbreviation.test.js:3
↓ 11 callers
Method
head
()
Data-Structures/Linked-List/SinglyLinkedList.js:42
↓ 11 callers
Method
insert
(position, element)
Data-Structures/Linked-List/DoublyLinkedList.js:33
↓ 11 callers
Function
intToBase
(number, base)
Maths/IntToBase.js:15
↓ 11 callers
Function
isPalindromeIntegerNumber
(x)
Maths/isPalindromeIntegerNumber.js:9
↓ 11 callers
Function
lengthOfLongestSubstring
(s)
String/LengthofLongestSubstringWithoutRepetition.js:10
↓ 11 callers
Method
remove
(word, count)
Data-Structures/Tree/Trie.js:67
↓ 10 callers
Method
addEdge
(node1, node2)
Graphs/Kosaraju.js:30
↓ 10 callers
Function
approximatelyEqualHsv
(hsv1, hsv2)
Conversions/RgbHsvConversion.js:84
↓ 10 callers
Function
hexToBinary
(hexString)
Conversions/HexToBinary.js:21
↓ 10 callers
Function
hsvToRgb
(hue, saturation, value)
Conversions/RgbHsvConversion.js:19
↓ 10 callers
Function
levenshteinDistance
(a, b)
String/LevenshteinDistance.js:12
↓ 10 callers
Function
parityOutlier
(integers)
Maths/ParityOutlier.js:9
↓ 10 callers
Function
rgbToHsv
(red, green, blue)
Conversions/RgbHsvConversion.js:48
↓ 10 callers
Function
upperCaseConversion
(inputString)
Conversions/UpperCaseConversion.js:18
↓ 9 callers
Function
ROT13
* @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 callers
Function
convertArbitraryBase
( stringInBaseOne, baseOneCharacterString, baseTwoCharacterString )
Conversions/ArbitraryBase.js:21
↓ 9 callers
Method
delete
()
Data-Structures/Heap/MinPriorityQueue.js:112
↓ 8 callers
Function
Atbash
(str)
Ciphers/Atbash.js:8
↓ 8 callers
Function
BinaryCountSetBits
(a)
Bit-Manipulation/BinaryCountSetBits.js:10
↓ 8 callers
Function
ReverseStringIterative
* A short example showing how to reverse a string.
String/ReverseString.js:4
↓ 8 callers
Function
XORCipher
(str, key)
Ciphers/XORCipher.js:12
↓ 8 callers
Method
addValue
(val)
Data-Structures/Tree/BinarySearchTree.js:141
↓ 8 callers
Function
alphaNumericPalindrome
(str)
String/AlphaNumericPalindrome.js:17
↓ 8 callers
Function
diceCoefficient
(stringA, stringB)
String/DiceCoefficient.js:33
↓ 8 callers
Function
findMaxRecursion
* @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 callers
Method
getHead
()
Data-Structures/Linked-List/DoublyLinkedList.js:192
↓ 8 callers
Method
initiateNodeAndIndex
()
Data-Structures/Linked-List/SinglyLinkedList.js:32
↓ 8 callers
Function
iterate
(initialVectors, steps)
Recursive/KochSnowflake.js:84
↓ 8 callers
Method
pop
* Removes the element with least priority * @returns the key of the element with least priority
Data-Structures/Heap/KeyPriorityQueue.js:55
↓ 8 callers
Method
removeAt
(index)
Data-Structures/Linked-List/SinglyLinkedList.js:199
↓ 8 callers
Method
removeFirst
()
Data-Structures/Linked-List/SinglyLinkedList.js:85
↓ 7 callers
Function
CoPrimeCheck
(firstNumber, secondNumber)
Maths/CoPrimeCheck.js:21
↓ 7 callers
Function
NumberOfLocalMaximumPoints
(A)
Data-Structures/Array/NumberOfLocalMaximumPoints.js:42
↓ 7 callers
Function
caesarCipher
(str, rotation)
Ciphers/CaesarCipher.js:9
↓ 7 callers
Function
change
(coins, amount)
Dynamic-Programming/CoinChange.js:5
↓ 7 callers
Function
coinChangeMin
(coins, amount)
Dynamic-Programming/CoinChange.js:22
↓ 7 callers
Function
countSubstrings
(str, substring)
String/CountSubstrings.js:11
↓ 7 callers
Function
decrypt
* 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 callers
Function
extendedEuclideanGCD
(arg1, arg2)
Maths/ExtendedEuclideanGCD.js:27
↓ 7 callers
Method
extractTop
* Removes and returns the top element of the heap. * @returns {*} - The top element of the heap.
Data-Structures/Heap/BinaryHeap.js:109
↓ 7 callers
Function
fermatPrimeCheck
(n, numberOfIterations = 50)
Maths/FermatPrimalityTest.js:77
↓ 7 callers
Function
fibonacci
(N)
Dynamic-Programming/FibonacciNumber.js:8
↓ 7 callers
Method
getElementAt
(index)
Data-Structures/Linked-List/SinglyCircularLinkedList.js:23
↓ 7 callers
Method
isEmpty
* @description - Return is queue empty or not * @returns {boolean}
Data-Structures/Queue/Queue.js:109
↓ 7 callers
Function
lower
(str)
String/Lower.js:10
↓ 7 callers
Function
palindrome
(str)
Recursive/Palindrome.js:9
↓ 7 callers
Function
selectionSort
(list)
Sorts/SelectionSort.js:11
next →
1–100 of 925, ranked by callers