MCPcopy Create free account

hub / github.com/neetcode-gh/leetcode / functions

Functions3,416 in github.com/neetcode-gh/leetcode

↓ 324 callersMethodadd
(int key)
java/0705-design-hashset.java:7
↓ 266 callersMethodget
(int key)
java/0460-lfu-cache.java:23
↓ 239 callersMethodpush
* @param {number} val * @return {void}
javascript/0155-min-stack.js:24
↓ 180 callersMethodsize
()
typescript/1046-last-stone-weight.ts:52
↓ 162 callersFunctiondfs
(i: number)
typescript/0078-subsets.ts:4
↓ 154 callersMethodisEmpty
()
javascript/0901-online-stock-span.js:8
↓ 145 callersMethodput
(int key, int value)
java/0460-lfu-cache.java:30
↓ 130 callersMethodpush
(val: number)
typescript/0155-min-stack.ts:10
↓ 108 callersFunctionmax
(a, b int)
go/0213-house-robber-ii.go:27
↓ 88 callersMethodget
(key)
javascript/0146-lru-cache.js:58
↓ 67 callersMethodset
* @param {string} key * @param {string} value * @param {number} timestamp * Time O(1) | Space O(1) * @return {void}
javascript/0981-time-based-key-value-store.js:19
↓ 64 callersMethodcontains
(int key)
java/0705-design-hashset.java:15
↓ 58 callersMethodadd
(self, key: int)
python/0705-design-hashset.py:6
↓ 58 callersFunctiondfs
(grid [][]int, row, col int)
go/0695-max-area-of-island.go:19
↓ 58 callersMethodpop
(self)
python/0155-min-stack.py:11
↓ 55 callersMethodget
(key: number)
typescript/0146-lru-cache.ts:35
↓ 55 callersMethodtoString
()
java/1851-Minimum-Interval-to-Include-Each-Query.java:13
↓ 54 callersMethodpeek
()
javascript/0901-online-stock-span.js:13
↓ 50 callersMethodpop
()
java/0155-min-stack.java:19
↓ 46 callersMethodpop
* @return {void}
javascript/0155-min-stack.js:36
↓ 46 callersMethodremove
(Node node)
java/0146-lru-cache.java:46
↓ 44 callersFunctionmin
(x, y int)
go/0322-coin-change.go:21
↓ 42 callersMethodpop
()
typescript/0155-min-stack.ts:22
↓ 40 callersMethodadd
* Time O(1) | Space O(1) * @param {number} key * @return {void}
javascript/0705-design-hashset.js:12
↓ 34 callersFunctionbacktrack
(i: number, subset: number[])
typescript/0090-subsets-ii.ts:5
↓ 31 callersMethodreverse
(int x)
java/0007-reverse-integer.java:3
↓ 31 callersMethodset
(key: string, value: string, timestamp: number)
typescript/0981-time-based-key-value-store.ts:9
↓ 30 callersMethodequals
(Object obj)
java/0920-number-of-music-playlists.java:45
↓ 29 callersMethodpush
(int val)
java/0155-min-stack.java:11
↓ 27 callersMethodget
(self, key: int)
python/0146-lru-cache.py:26
↓ 27 callersMethodgetKey
(x, y)
javascript/2013-detect-squares.js:35
↓ 24 callersFunctionbacktrack
(n, k, start int, arr []int, ans *[][]int)
go/0077-combinations.go:1
↓ 23 callersMethodpopleft
()
javascript/0460-lfu-cache.js:36
↓ 22 callersMethodadd
(word: string)
typescript/0212-word-search-ii.ts:9
↓ 20 callersFunctionabs
(x int)
go/1046-last-stone-weight.go:38
↓ 20 callersFunctionsum
(num1, num2)
javascript/2235-add-two-integers.js:6
↓ 19 callersMethodremove
(self, node)
python/0146-lru-cache.py:16
↓ 14 callersFunctionhelper
(x: number, n: number)
typescript/0050-powx-n.ts:2
↓ 11 callersFunctionlist
(mapping map[string]bool)
go/0212-word-search-ii.go:76
↓ 10 callersMethodcompare
(String s1, String s2)
java/0179-largest-number.java:10
↓ 9 callersFunctionadd
(digits)
javascript/0066-plus-one.js:15
↓ 9 callersMethodreverse
(self, x: int)
python/0007-reverse-integer.py:2
↓ 8 callersFunctionminDistance
(word1, word2, i = 0, j = 0)
javascript/0072-edit-distance.js:9
↓ 7 callersFunctiongetNext
(n, sum = 0)
javascript/0202-happy-number.js:19
↓ 6 callersFunctioncanBreak
(s, wordSet, start = 0)
javascript/0139-word-break.js:16
↓ 6 callersFunctionchange
(amount, coins, n = coins.length)
javascript/0518-coin-change-ii.js:8
↓ 6 callersFunctionisStar
(char)
javascript/0678-valid-parenthesis-string.js:89
↓ 6 callersFunctionsortedArrayToBST
(nums, left = 0, right = nums.length - 1)
javascript/0108-convert-sorted-array-to-binary-search-tree.js:17
↓ 6 callersFunctionsquaredDistance
([x, y])
javascript/0973-k-closest-points-to-origin.js:21
↓ 5 callersFunctionNewNode
(val int, prev, next *Node)
go/0707-design-linked-list.go:7
↓ 5 callersMethodcount
(self, point: List[int])
python/2013-detect-squares.py:10
↓ 5 callersFunctioncounter
(text string)
go/1189-maximum-number-of-balloons.go:12
↓ 5 callersMethoddfs
(char c, int n, int l)
java/1220-count-vowels-permutation.java:113
↓ 5 callersFunctiondistance
([x, y])
javascript/0937-k-closest-points-to-origin.js:9
↓ 5 callersMethodfind
(i: number)
typescript/2421-number-of-good-paths.ts:10
↓ 5 callersMethodfind
* * @param {number} i * @returns {number}
javascript/2421-number-of-good-paths.js:12
↓ 5 callersMethodfind
(int x)
java/0721-accounts-merge.java:53
↓ 5 callersMethodinsert
(Node node)
java/0146-lru-cache.java:55
↓ 5 callersFunctionisEqual
(num, indexNum)
javascript/0041-first-missing-positive.js:52
↓ 5 callersFunctionisSame
(a, b)
javascript/0287-find-the-duplicate-number.js:172
↓ 5 callersFunctionlongestCommonSubsequence
(text1, text2, p1 = 0, p2 = 0, memo = initMemo(text1, text2))
javascript/1143-Longest-Common-Subsequence.js:10
↓ 5 callersFunctionlongestCommonSubsequence
(text1, text2, p1 = 0, p2 = 0, memo = initMemo(text1, text2))
javascript/1143-longest-common-subsequence.js:10
↓ 5 callersFunctionmap
(arr, fn)
javascript/2635-apply-transform-over-each-element-in-array.js:6
↓ 4 callersMethodPush
(x interface{})
go/0295-find-median-from-data-stream.go:5
↓ 4 callersMethod__find
(self, n: int)
python/0261-graph-valid-tree.py:43
↓ 4 callersFunctionbuildTree
(preorder, inorder)
javascript/0105-construct-binary-tree-from-preorder-and-inorder-traversal.js:8
↓ 4 callersFunctiondfs
(board, row, rows, col, cols)
javascript/0130-surrounded-regions.js:49
↓ 4 callersFunctiondfs
(row, col, rows, cols, isReachable, heights)
javascript/0417-pacific-atlantic-water-flow.js:84
↓ 4 callersFunctiondfs
(board [][]byte, m int, n int)
go/0130-surrounded-regions.go:28
↓ 4 callersMethoddfs
(int r, int c, int[][] board)
java/1020-number-of-enclaves.java:22
↓ 4 callersMethoddfs
(char[][] board, int r, int c)
java/0130-surrounded-regions.java:27
↓ 4 callersMethoddfs
( int[][] heights, int i, int j, int prev, boolean[][] ocean )
java/0417-pacific-atlantic-water-flow.java:32
↓ 4 callersFunctionfind
(union, i, num = union[i])
javascript/0261-graph-valid-tree.js:127
↓ 4 callersFunctionfind
(parent []int, num int)
go/0684-redundant-connection.go:19
↓ 4 callersMethodfind
(self, x)
python/0721-accounts-merge.py:6
↓ 4 callersMethodfind
(i int)
go/2421-number-of-good-paths.go:27
↓ 4 callersMethodfind
(int x)
java/0684-redundant-connection.java:19
↓ 4 callersMethodget
(String key, int timestamp)
java/0981-time-based-key-value-store.java:14
↓ 4 callersFunctiongetAndPopLastOperand
(stack []int)
go/0150-evaluate-reverse-polish-notation.go:26
↓ 4 callersFunctiongetHeight
(root)
javascript/0110-balanced-binary-tree.js:32
↓ 4 callersFunctiongetLeft
(i, j, s1, s3, tabu)
javascript/0097-interleaving-string.js:183
↓ 4 callersFunctiongetNeighbors
(row, rows, col, cols)
javascript/0329-longest-increasing-path-in-a-matrix.js:48
↓ 4 callersFunctiongetRight
(i, j, s2, s3, tabu)
javascript/0097-interleaving-string.js:186
↓ 4 callersFunctiongetSum
(nums, sum = 0)
javascript/0416-partition-equal-subset-sum.js:20
↓ 4 callersMethodgetWinner
(int p)
java/1275-find-winner-on-a-tic-tac-toe-game.java:28
↓ 4 callersFunctionindex
(row, cols, col)
javascript/0200-number-of-islands.js:150
↓ 4 callersFunctionisCyclic
(currCourse, graph, path)
javascript/0207-course-schedule.js:41
↓ 4 callersFunctionisInterleave
(s1, s2, s3, i = 0, j = 0, res = '')
javascript/0097-interleaving-string.js:10
↓ 4 callersFunctionisSameNode
(p, q)
javascript/0100-same-tree.js:71
↓ 4 callersFunctionmarkSeen
(r: number, c: number)
typescript/0130-surrounded-regions.ts:32
↓ 4 callersFunctionmax
(a, b int)
go/0124-binary-tree-maximum-path-sum.go:27
↓ 4 callersFunctionmergeSort
(left, right, nums)
javascript/0912-sort-an-array.js:12
↓ 4 callersMethodpush
(self, val: int)
python/0155-min-stack.py:6
↓ 4 callersFunctionsearch
( nums, left = 1, right = nums.length - 2, memo = initMemo(nums), )
javascript/0312-burst-balloons.js:15
↓ 4 callersMethodset
(String key, String value, int timestamp)
java/0981-time-based-key-value-store.java:9
↓ 4 callersMethodsumSquareDigits
(self, n)
python/0202-happy-number.py:12
↓ 4 callersMethodtop
(heap)
javascript/0295-find-median-from-data-stream.js:49
↓ 4 callersMethodunion
(self, v1, v2)
python/1489-find-critical-and-pseudo-critical-edges-in-minimum-spanning-tree.py:12
↓ 4 callersFunctionuniquePaths
(row, col)
javascript/0062-unique-paths.js:9
↓ 3 callersFunctionNewNode
(val int, prev, next *Node)
go/0622-design-circular-queue.go:7
next →1–100 of 3,416, ranked by callers