Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/betomoedano/JavaScript-Coding-Interview-Questions
/ functions
Functions
422 in github.com/betomoedano/JavaScript-Coding-Interview-Questions
⨍
Functions
422
◇
Types & classes
98
↓ 1 callers
Function
dfs
(node)
graphs/2246-longest-path-with-different-adjacent-chars.js:34
↓ 1 callers
Function
dfs
(curNode, preNode)
graphs/2477-minimum-fuel-cost-to-report-to-the-capital.js:10
↓ 1 callers
Function
dfs
(start, result, currentList, string)
backtracking/131-palindrome-partitioning.js:28
↓ 1 callers
Function
dfs2
(cur, parent, ans_p, adjList, output, count, n)
graphs/sum-of-distances-in-tree.js:23
↓ 1 callers
Function
encoding
(string)
strings/run-length-encoding.js:3
↓ 1 callers
Function
explore
(row, col, board, visited, trieNode, finalWords)
graphs/boggle-board.js:33
↓ 1 callers
Function
find
(target, currPath, index, candidates, paths)
arrays/combination-sum.js:69
↓ 1 callers
Function
findBattleships
(matrix)
matrix/find-battleships.js:4
↓ 1 callers
Function
findClosestValueInBst
(tree, target)
binary-trees/find-closest-value-in-bst.js:3
↓ 1 callers
Function
findClosestValueInBstHelper
(tree, target, closest)
binary-trees/find-closest-value-in-bst.js:7
↓ 1 callers
Function
findKthHelper
(tree, array)
binary-trees/find-kth-largest-value-in-bst.js:16
↓ 1 callers
Function
findMaxSum
(tree)
binary-trees/max-path-sum-in-binary-tree.js:9
↓ 1 callers
Function
findSmallStringsIn
(string, startIdx, trie, containedStrings)
tries/multi-string-search.js:87
↓ 1 callers
Function
findSuccessor
(tree, node)
binary-trees/Find-Successor.js:29
↓ 1 callers
Function
firstNonRepeatingLetter
(s)
strings/first-non-repeating-letter.js:3
↓ 1 callers
Function
generateParenthesis
(n)
recursion/generate-parentheses.js:4
↓ 1 callers
Function
getBattleShip
(matrix, startRow, startCol)
matrix/find-battleships.js:19
↓ 1 callers
Function
getCountsAndFirstYPosition
(pattern, counts)
strings/pattern-matcher.js:44
↓ 1 callers
Function
getLength
(head)
linkedLists/linked-list-palindrome.js:65
↓ 1 callers
Function
getMaxHeight
(node, treeInfo, nodeDepth = 1)
binary-trees/104-maximum-depth-of-binary-tree.js:29
↓ 1 callers
Function
getMinSpaces
(pi, numbersTable, cache, idx)
recursion/numbers-in-pi.js:13
↓ 1 callers
Method
getMinValue
()
binary-trees/bst-construction.js:90
↓ 1 callers
Function
getNeighbors
(row, col, board)
graphs/boggle-board.js:48
↓ 1 callers
Function
getNeighbors
(row, col, matrix)
matrix/minimum-pases-of-matrix.js:39
↓ 1 callers
Function
getNeighbors
(grid, row, col)
matrix/number-of-islands.js:31
↓ 1 callers
Function
getNeighbors
(matrix, row, col)
matrix/find-battleships.js:42
↓ 1 callers
Function
getNeighbors
(matrix, row, col)
matrix/remove-islands.js:123
↓ 1 callers
Function
getNewLetter
(char, aphabet, key)
strings/caesar-cipher-encryptor.js:13
↓ 1 callers
Function
getNewPattern
(pattern)
strings/pattern-matcher.js:35
↓ 1 callers
Function
getNextIdx
(currentIdx, array)
dynamic-programming/hasSingleCycle.js:19
↓ 1 callers
Function
getOrderedJobs
(graph)
graphs/topological-sort.js:17
↓ 1 callers
Function
getPalindromes
(string)
strings/palindroms-inside-string.js:5
↓ 1 callers
Function
getPermsHelper
(freq, prefix, remaining, result)
recursion/permutations.js:38
↓ 1 callers
Function
getPermutations
(array)
recursion/permutations.js:2
↓ 1 callers
Function
getStartingAndEnding
(startingIdx, nums, target)
arrays/find-first-and-last-position-of-element-in-sorted-array.js:26
↓ 1 callers
Function
getSumHelper
(node, low, high, sumInfo)
binary-trees/range-sum-of-bst.js:27
↓ 1 callers
Function
getTaskDurationToIndices
(tasks)
greedy/task-assignment.js:27
↓ 1 callers
Function
getTreeInfoHelper
(tree)
binary-trees/Binary-Tree-Diameter.js:25
↓ 1 callers
Function
getTrees
()
binary-trees/youngest-commond-ancestor.js:20
↓ 1 callers
Function
getUnvisitedNeighbors
(row, col, matrix, visited)
graphs/riverSizes.js:81
↓ 1 callers
Function
getVertexWithMinDistance
(distances, visited)
graphs/dijkstrasAlgorithm.js:161
↓ 1 callers
Function
getYoungestCommonAncestor
(topAncestor, descendantOne, descendantTwo)
binary-trees/youngest-commond-ancestor.js:29
↓ 1 callers
Function
groupAnagrams
(words)
strings/group-anagrams.js:4
↓ 1 callers
Function
hasSingleCycle
(array)
dynamic-programming/hasSingleCycle.js:7
↓ 1 callers
Function
hasUniqueCharacters
(string)
arrays/has-unique-chars.js:3
↓ 1 callers
Function
heightBalancedBinaryTree
(tree)
binary-trees/heigth-balanced-binary-tree.js:22
↓ 1 callers
Function
helper
(node, currMax, currMin)
binary-trees/maximum-difference-between-node-and-ancestor.js:21
↓ 1 callers
Function
inOrderTraverse
(node, items)
binary-trees/Find-Successor.js:43
↓ 1 callers
Method
insert
(values, i = 0)
binary-trees/branch-sums.js:7
↓ 1 callers
Method
insert
(string)
tries/multi-string-search.js:61
↓ 1 callers
Method
insertAfter
(node, nodeToInsert)
linkedLists/construct-linked-list.js:48
↓ 1 callers
Function
insertInSortedOrder
(stack, value)
stacks/sort-stack.js:16
↓ 1 callers
Method
insertStringFrom
(i, string)
tries/multi-string-search.js:19
↓ 1 callers
Method
insertSubstringStartingAt
(i, string)
tries/suffix-trie-construction.js:15
↓ 1 callers
Function
isBalancedHelper
(node)
binary-trees/heigth-balanced-binary-tree.js:26
↓ 1 callers
Function
isOutOfBounds
(row, col, height, width)
matrix/zigzag-traverse.js:43
↓ 1 callers
Function
isOutOfOrder
(i, num, array)
arrays/subarray-sort.js:27
↓ 1 callers
Function
isPalindrome
(string)
strings/palindroms-inside-string.js:25
↓ 1 callers
Function
isPalindrome
(string)
backtracking/131-palindrome-partitioning.js:43
↓ 1 callers
Function
isUnique
(string)
strings/isUnique.js:1
↓ 1 callers
Function
isValidWalk
(walk)
arrays/isValidWalk.js:1
↓ 1 callers
Function
kadanesAlgorithm
(array)
arrays/kadanes-algorith.js:7
↓ 1 callers
Function
largestRange
(array)
arrays/largest-range.js:3
↓ 1 callers
Function
left
(row, col, matrix)
matrix/zero-matrix.js:104
↓ 1 callers
Function
levenshteinDistance
(str1, str2)
dynamic-programming/levenshteinDistance.js:4
↓ 1 callers
Function
listOfDepths
(root)
binary-trees/list-of-depths.js:17
↓ 1 callers
Function
longestCommonSubstring
(string1, string2)
dynamic-programming/longest-common-subsecuence.js:45
↓ 1 callers
Function
longestPalindromicSubstring
(string)
strings/longes-palindromic-substring.js:5
↓ 1 callers
Function
maxSubArray
(nums)
arrays/max-subarray.js:4
↓ 1 callers
Function
maxSubsetSumNoAdjacent
(array)
dynamic-programming/max-subset-sum-no-adjacent.js:39
↓ 1 callers
Function
mergeLinkedLists
(headOne, headTwo)
linkedLists/merge-linked-lists.js:33
↓ 1 callers
Function
minHeightHelper
(array, startIdx, endIdx)
binary-trees/min-heigth-bst.js:7
↓ 1 callers
Function
minNumberOfCoinsForChange
(n, denoms)
dynamic-programming/min-num-of-coins-for-change.js:3
↓ 1 callers
Function
minRewards
(scores)
arrays/min-rewards.js:4
↓ 1 callers
Function
minimumPassesOfMatrix
(matrix)
matrix/minimum-pases-of-matrix.js:5
↓ 1 callers
Function
nextGreaterElement
(array)
stacks/next-greater-element.js:3
↓ 1 callers
Function
nodeDepths
(root)
binary-trees/node-depths.js:10
↓ 1 callers
Function
numIslands
(grid)
matrix/number-of-islands.js:3
↓ 1 callers
Function
numberOfWaysToMakeChange
(n, denoms)
dynamic-programming/number-of-ways-to-make-change.js:4
↓ 1 callers
Function
numberOfWaysToTraverseGraph
(width, height)
dynamic-programming/numberOfWaysToTraverseGraph.js:48
↓ 1 callers
Method
peek
()
stacks/queue-via-stacks.js:55
↓ 1 callers
Function
permutationsHelper
(i, array, permutations)
recursion/permutations.js:8
↓ 1 callers
Function
phoneNumberMnemonics
(phoneNumber)
recursion/phone-number-mnemonics.js:19
↓ 1 callers
Function
phoneNumberMnemonicsHelper
( idx, phoneNumber, currentMnemonic, mnemonicsFound )
recursion/phone-number-mnemonics.js:28
↓ 1 callers
Method
pop
()
stacks/min-max-stack-construction.js:13
↓ 1 callers
Method
populateSuffixTrieFrom
(string)
tries/multi-string-search.js:13
↓ 1 callers
Method
populateSuffixTrieFrom
(string)
tries/suffix-trie-construction.js:9
↓ 1 callers
Function
powerset
(array, idx = null)
recursion/powerset.js:21
↓ 1 callers
Function
productSum
(array, depth = 1)
recursion/product-sum.js:3
↓ 1 callers
Function
quickSort
(array)
sorting/quick-sort.js:5
↓ 1 callers
Function
quickSortHelper
(array, startIdx, endIdx)
sorting/quick-sort.js:10
↓ 1 callers
Function
remove
(string1, string2)
strings/one-edit.js:67
↓ 1 callers
Method
remove
()
heaps/min-heap-construction.js:47
↓ 1 callers
Method
removeBindings
(node)
linkedLists/construct-linked-list.js:106
↓ 1 callers
Function
removeDuplicates
(nums)
arrays/remove-duplicates-from-sorted-array.js:19
↓ 1 callers
Function
removeDuplicatesFromLinkedList
(linkedList)
linkedLists/remove-duplicates-from-linkedlist.js:51
↓ 1 callers
Function
removeIslands
(matrix)
matrix/remove-islands.js:73
↓ 1 callers
Function
removeMiddleNode
(list, valueToRemove)
linkedLists/remove-middle-node.js:15
↓ 1 callers
Function
reverseInOrderTraverse
(node, k, treeInfo)
binary-trees/find-kth-largest-value-in-bst.js:42
↓ 1 callers
Function
reverseList
(list)
strings/reverse-words-in-string.js:25
← previous
next →
101–200 of 422, ranked by callers