MCPcopy Create free account

hub / github.com/betomoedano/JavaScript-Coding-Interview-Questions / functions

Functions422 in github.com/betomoedano/JavaScript-Coding-Interview-Questions

↓ 166 callersMethodpush
(element)
stacks/min-stack.js:8
↓ 31 callersMethodpop
()
stacks/min-stack.js:16
↓ 10 callersMethodaddChild
(name)
graphs/depth-first-search.js:7
↓ 10 callersMethodaddChild
(name)
graphs/breadth-first-search.js:11
↓ 9 callersMethodadd
(string)
graphs/boggle-board.js:7
↓ 8 callersMethodsize
()
stacks/queue-via-stacks.js:43
↓ 5 callersFunctionchess
(size)
matrix/chess-board.js:1
↓ 4 callersMethod_getLength
(stack)
stacks/triple-stack.js:20
↓ 4 callersMethodaddAsAncestor
(descendants)
binary-trees/youngest-commond-ancestor.js:13
↓ 4 callersMethodfind
(value)
famous-algorithms/union-find.js:11
↓ 4 callersMethodgetMax
()
stacks/min-max-stack-construction.js:36
↓ 4 callersMethodgetMin
()
stacks/min-max-stack-construction.js:31
↓ 4 callersFunctiononeAway
(array1, array2)
strings/one-away.js:48
↓ 4 callersFunctionpossibleBipartition
(n, dislikes)
graphs/possible-bipartition.js:9
↓ 4 callersMethodpush
(stack, value)
stacks/triple-stack.js:24
↓ 4 callersFunctionzeroSumSubarray
(nums)
arrays/zero-subarray-sum.js:2
↓ 3 callersMethodaddMany
(values)
linkedLists/merge-linked-lists.js:7
↓ 3 callersFunctionbalancedBrackets
(string)
stacks/balanced-brackets.js:4
↓ 3 callersFunctionfactorial
(num)
dynamic-programming/numberOfWaysToTraverseGraph.js:54
↓ 3 callersFunctiongetSums
(nums, target)
backtracking/target-sum.js:14
↓ 3 callersMethodisEmpty
()
stacks/queue-via-stacks.js:46
↓ 3 callersMethodpeek
()
stacks/min-max-stack-construction.js:8
↓ 3 callersMethodpush
(number)
stacks/min-max-stack-construction.js:19
↓ 3 callersMethodremove
(node)
linkedLists/construct-linked-list.js:90
↓ 3 callersFunctionrouteBetweenNodes
* Given a directed graph and two nodes S and E. * Design an algorithm to find out whether there is a route from S to E * Time O(v + e) - where v are
graphs/route-between-nodes.js:8
↓ 3 callersMethodswap
(i, j, heap)
heaps/min-heap-construction.js:59
↓ 2 callersMethod#shiftStacks
()
stacks/queue-via-stacks.js:18
↓ 2 callersMethodaddMany
(values)
linkedLists/sum-of-linked-lists.js:9
↓ 2 callersMethodaddNode
(job)
graphs/topological-sort.js:63
↓ 2 callersFunctionallLowerOrAllUpper
(string, upper)
strings/detect-capital.js:31
↓ 2 callersFunctionbacktrackAncestralTree
(lowerDecendant, higherDesecendant, diff)
binary-trees/youngest-commond-ancestor.js:47
↓ 2 callersFunctioncheckPermutation
(str1, str2)
arrays/check-permutation.js:11
↓ 2 callersMethodenqueue
(element)
graphs/dijkstrasAlgorithm.js:15
↓ 2 callersFunctiongetBiggerOrEqual
(array)
binary-trees/same-bsts.js:26
↓ 2 callersFunctiongetDepthOfDecendant
(decendant, topAncestor)
binary-trees/youngest-commond-ancestor.js:59
↓ 2 callersFunctiongetDfsOrder
(node, values)
binary-trees/__test__/minimal-tree.test.js:3
↓ 2 callersFunctiongetListArray
(list)
linkedLists/merging-linked-lists.js:60
↓ 2 callersFunctiongetLongestPalindromeFrom
(string, leftIdx, rightIdx)
strings/longes-palindromic-substring.js:20
↓ 2 callersMethodgetNode
(job)
graphs/topological-sort.js:58
↓ 2 callersMethodgetNodesInArray
()
linkedLists/merge-linked-lists.js:19
↓ 2 callersFunctiongetRightDifferent
(array, from, toMove)
arrays/move-element-to-end.js:32
↓ 2 callersFunctiongetSmaller
(array)
binary-trees/same-bsts.js:17
↓ 2 callersFunctiongetTotalSpeedHelper
(redShirtSpeeds, blueShirtSpeeds)
greedy/tandem-bicycle.js:16
↓ 2 callersMethodinsertBefore
(node, nodeToInsert)
linkedLists/construct-linked-list.js:34
↓ 2 callersMethodisEmpty
()
graphs/dijkstrasAlgorithm.js:40
↓ 2 callersMethodisValidSubsequence
( List<Integer> array, List<Integer> sequence )
arrays/ValidateSubsequence.java:11
↓ 2 callersFunctionnumbersInPi
(pi, numbers)
recursion/numbers-in-pi.js:3
↓ 2 callersMethodpop
()
stacks/queue-via-stacks.js:52
↓ 2 callersMethodpush
(value)
stacks/queue-via-stacks.js:49
↓ 2 callersMethodsetHead
(node)
linkedLists/construct-linked-list.js:17
↓ 2 callersMethodsiftDown
(currentIdx, endIdx, heap)
heaps/min-heap-construction.js:14
↓ 2 callersFunctionsumSpeeds
(red, blue)
arrays/tandem-bicycle.js:31
↓ 2 callersFunctionswap
(i, j, array)
sorting/quick-sort.js:39
↓ 2 callersFunctionswap
(first, second, array)
sorting/three-num-sort.js:65
↓ 2 callersFunctionswap
(i, j, array)
recursion/permutations.js:20
↓ 2 callersFunctiontraverseHelper
(node, array)
binary-trees/leaf-similar-trees.js:36
↓ 1 callersFunctionDFS
(node, edges, visitedVertices, inStack)
graphs/cyle-in-graph.js:17
↓ 1 callersFunctionLCS
(i, j, a, b, memo)
dynamic-programming/longest-common-subsecuence.js:28
↓ 1 callersMethodaddPrereq
(job, prereq)
graphs/topological-sort.js:52
↓ 1 callersFunctionbacktrack
(currentSubsequence, startIndex)
backtracking/491-non-decreasing-subsequences.js:42
↓ 1 callersFunctionbacktrack
(idx, currSum, currSumArray, nums, result, target)
backtracking/target-sum.js:20
↓ 1 callersFunctionbacktrackHelper
(openNumber, closedNumber)
recursion/generate-parentheses.js:8
↓ 1 callersFunctionbfs
(source, adjList, colors)
graphs/possible-bipartition.js:27
↓ 1 callersFunctionbinarySearch
(target, nums)
arrays/longest-subsequence-with-limited-sum.js:26
↓ 1 callersFunctionbinaryTreeDiameter
(tree)
binary-trees/Binary-Tree-Diameter.js:21
↓ 1 callersFunctionbottom
(row, col, matrix)
matrix/zero-matrix.js:97
↓ 1 callersFunctionbranchSums
(root)
binary-trees/branch-sums.js:30
↓ 1 callersFunctionbranchSumsHelper
(root, currentSum, sums)
binary-trees/branch-sums.js:34
↓ 1 callersMethodbreadthFirstSearch
(array)
graphs/breadth-first-search.js:16
↓ 1 callersFunctionbubbleSort
(array)
sorting/bubble-sort.js:10
↓ 1 callersFunctionbuildFreqTable
(string)
recursion/permutations.js:55
↓ 1 callersMethodbuildHeap
(array)
heaps/min-heap-construction.js:6
↓ 1 callersFunctionbuildSequence
(array, sequences, currentIdx)
dynamic-programming/disk-stacking.js:32
↓ 1 callersFunctioncaesarCipherEncryptor
(string, key)
strings/caesar-cipher-encryptor.js:2
↓ 1 callersFunctioncanShipInDays
(weights, capacity, days)
arrays/1011-capacity-to-ship-packages-within-d-days.js:32
↓ 1 callersFunctionchangeMatrix
(matrix)
matrix/find-battleships.js:56
↓ 1 callersFunctionchangeOnesConnectedToBorderToTwos
(matrix, startRow, startCol)
matrix/remove-islands.js:103
↓ 1 callersFunctioncheckAnagram
(start, end, string, freq)
strings/438-find-all-anagrams-in-a-string.js:37
↓ 1 callersFunctioncheckSymmetrical
(left, right)
binary-trees/symmetrical-tree.js:41
↓ 1 callersFunctionclassPhotos
(redShirtHeights, blueShirtHeights)
greedy/class-photos.js:1
↓ 1 callersFunctioncombinationHelper
( index, currentCombination, totalSum, target, candidates, uniqueCombinations )
arrays/combination-sum.js:16
↓ 1 callersFunctioncompareWords
(word1, word2, order)
strings/953-verifying-an-alien-dictionary.js:20
↓ 1 callersMethodcontains
(value)
binary-trees/bst-construction.js:34
↓ 1 callersMethodcontains
(string)
tries/multi-string-search.js:32
↓ 1 callersFunctioncontainsNegative
(matrix)
matrix/minimum-pases-of-matrix.js:49
↓ 1 callersFunctioncount
(n)
dynamic-programming/domino-and-tromino-tilling.js:12
↓ 1 callersFunctioncreateAdjacencyList
(n, edges)
graphs/sum-of-distances-in-tree.js:53
↓ 1 callersFunctioncreateAdjacencyList
(edges)
graphs/possible-bipartition.js:51
↓ 1 callersFunctioncreateAdjacencyList
(edges)
graphs/2477-minimum-fuel-cost-to-report-to-the-capital.js:26
↓ 1 callersFunctioncreateGraph
(edges, graph)
graphs/find-if-path-exist-in-graph.js:38
↓ 1 callersFunctioncreateJobGraph
(jobs, deps)
graphs/topological-sort.js:9
↓ 1 callersFunctioncreateMinimalBST
(arr)
binary-trees/minimal-tree.js:19
↓ 1 callersFunctioncreateMinimalBSTHelper
(arr, start, end)
binary-trees/minimal-tree.js:23
↓ 1 callersFunctioncycleInGraph
(edges)
graphs/cyle-in-graph.js:4
↓ 1 callersMethoddepthFirstSearch
(array)
graphs/depth-first-search.js:14
↓ 1 callersFunctiondepthFirstTraverse
(node, orderedJobs)
graphs/topological-sort.js:29
↓ 1 callersMethoddequeue
()
graphs/dijkstrasAlgorithm.js:36
↓ 1 callersFunctiondfs
(currentNode, prevNode, count)
graphs/1519-number-of-nodes-in-the-sub-tree-with-the-same-labe.js:47
↓ 1 callersFunctiondfs
(cur, parent, depth, adjList, treeInfo, count)
graphs/sum-of-distances-in-tree.js:40
↓ 1 callersFunctiondfs
(node, parent)
graphs/1443-minimum-time-to-collect-all-apples-in-a-tree.js:65
next →1–100 of 422, ranked by callers