MCPcopy Create free account

hub / github.com/SHY-Corp/LeetCode-Solutions / functions

Functions846 in github.com/SHY-Corp/LeetCode-Solutions

↓ 470 callersMethodsize
C++/225. Implement Stack Using Queues.cpp:61
↓ 69 callersMethodpush
C++/155. Min Stack.cpp:25
↓ 67 callersMethodempty
Returns whether the stack is empty.
Python/225.ImplementStackUsingQueues.py:35
↓ 54 callersMethodtop
C++/155. Min Stack.cpp:51
↓ 50 callersMethodadd
C++/202. HappyNumber.cpp:23
↓ 49 callersMethodget
C++/146. LRUCache.cpp:52
↓ 47 callersMethodpop
C++/155. Min Stack.cpp:46
↓ 19 callersMethodinsert
Iterative function to insert string in a trie
C++/720.LongestWordInDictionary.cpp:51
↓ 17 callersMethodpop
Removes the element on top of the stack and returns that element.
Python/225.ImplementStackUsingQueues.py:23
↓ 14 callersMethodput
C++/146. LRUCache.cpp:60
↓ 11 callersMethodpush
C++/225. Implement Stack Using Queues.cpp:24
↓ 9 callersMethodgetKey
(int i, int j)
Java/79. WordSearch.java:81
↓ 9 callersMethodpop
C++/225. Implement Stack Using Queues.cpp:44
↓ 8 callersMethodremove
C++/705.DesignHashSet.cpp:15
↓ 6 callersMethodpeek
Returns the next element in the iteration without advancing the iterator.
C++/284.PeekingIterator.cpp:40
↓ 6 callersFunctionreverse
C++/7. Reverse_Integer.cpp:9
↓ 6 callersFunctionsearch
(self, nums, target)
Python/33. Search in Rotated Sorted Array.py:54
↓ 5 callersMethodcontains
C++/705.DesignHashSet.cpp:20
↓ 5 callersMethodreverseWords
(String s)
Java/151.ReverseWordsInAString.java:6
↓ 3 callersMethodbitCountUpdate
(int[] bits, int num, int update)
Java/1521.FindAValueOfAMysteriousFunctionClosestToTarget.java:40
↓ 3 callersMethodcanUseRow
(self, row, word)
Python/500.KeyboardRow.py:3
↓ 3 callersMethoddeQueue
Dequeue an item from the queue
C++/232. Implement Queue Using Stacks.cpp:31
↓ 3 callersMethodenQueue
C++/232. Implement Queue Using Stacks.cpp:12
↓ 3 callersMethodreverse
:type x: int :rtype: int
Python/7.ReverseInteger.py:4
↓ 3 callersMethodtop
C++/225. Implement Stack Using Queues.cpp:54
↓ 2 callersMethodGetNum
(int num)
Java/13.RomanToInteger.java:2
↓ 2 callersMethodbitsToValue
(int[] bits, int diff)
Java/1521.FindAValueOfAMysteriousFunctionClosestToTarget.java:47
↓ 2 callersMethodinsert
Inserts a word into the trie.
Python/208. ImplementTrie.py:15
↓ 2 callersFunctionint_
Converts strings to int, raises exception for non-int literals
Python/43. MultiplyStrings.py:22
↓ 2 callersFunctionisValid
C++/51.NQueens.cpp:11
↓ 2 callersMethodnumSubarraysLessAndEqualToSum
(int[] A, int S)
Java/930. Binary Subarrays With Sum.java:22
↓ 2 callersMethodswap
(int[] A, int i, int j)
Java/41. First Missing Positive.java:31
↓ 2 callersMethodtoggleCase
(char c)
Java/784.LetterCasePermutation.java:69
↓ 1 callersFunctionaddNode
C++/1365. SmallestNumberThanCurrentNumber.cpp:38
↓ 1 callersMethodbuild
(int tree[], int arr[], int index, int s, int e)
Java/307. Range Sum Query - Mutable.java:36
↓ 1 callersMethodcheckASC
(int[] A, int e)
Java/941. ValidMountainArray.java:3
↓ 1 callersMethodcheckDESC
(int[] A, int s, int e)
Java/941. ValidMountainArray.java:18
↓ 1 callersMethodcheckPangram
(String str)
Java/1103.Panagram_Check.java:12
↓ 1 callersFunctioncheckSolution
C++/51.NQueens.cpp:36
↓ 1 callersFunctioncount_squares
(matrix)
Python/1277. CountSquareSubmatricesWithAllOnes.py:22
↓ 1 callersMethoddfs
(self, grid, i, j)
Python/200. Number of Islands.py:120
↓ 1 callersMethoddfs
(List<int[]> line,List<int[]> line1, boolean[][] tempvisited, Count count, int[][] grid, int m, int n, int i,
Java/749. ContainVirus.java:97
↓ 1 callersFunctiondiagonalSort
C++/1329.SortTheMatrixDiagonally.cpp:5
↓ 1 callersFunctiondp
C++/10. Regular Expression Matching.cpp:15
↓ 1 callersMethoddupli
(int arr[], int index, int len)
Java/1089. DuplicateZeros.java:3
↓ 1 callersMethodfindDigit
(int n)
Java/1295. Find_Number_with_even.java:3
↓ 1 callersMethodfindGreatest
(int[] arr, int key)
Java/1299.ReplaceElementswithGreatestElementonRightSide.java:2
↓ 1 callersMethodfindKthLargest
(nums, k)
Python/215.KthLargestElementInAnArray.py:32
↓ 1 callersFunctionfindLongestSubstring
Function to find and print longest substring without repeating characters.
C++/3. LongestSubstringWithoutRepeatingCharacters.cpp:9
↓ 1 callersMethodfindMatch
()
Java/79. WordSearch.java:28
↓ 1 callersFunctionfindMinFibonacciNumbers
(k)
Python/findMinFibonacciNumbers.py:11
↓ 1 callersMethodfind_square
(self, matrix, x, y, side)
Python/221. MaximalSquare.py:25
↓ 1 callersMethodgeneratePermutations
(char[] s, List<String> permutations, int index)
Java/784.LetterCasePermutation.java:46
↓ 1 callersMethodgetMiddle
(self,head)
Python/148. SortList.py:6
↓ 1 callersMethodgetPath
(int[][] graph, int i, int dest, List<Integer> path, List<List<Integer>> res)
Java/797. AllPathsFromSourceToTarget.java:34
↓ 1 callersMethodgetSum
(TreeNode root, boolean isChildrenToBeAdded, int sum, Deque<TreeNode> treeStack)
Java/1315. Sum of Nodes with Even-Valued Grandparent.java:46
↓ 1 callersMethodgetSum
(TreeNode root)
Java/124.BinaryTreeMaxSumPath.java:49
↓ 1 callersFunctiongroupAnagrams
C++/49. Group_Anagrams.cpp:14
↓ 1 callersMethodinc
()
Java/749. ContainVirus.java:39
↓ 1 callersMethodinitializePascalTriangle
Initialize the triangle object and add the first element
Java/118. PascalsTriangle.java:51
↓ 1 callersMethodinorder
(self,root,output)
Python/938. RangeSumofBST.Py:15
↓ 1 callersMethodisCommonPrefix
(String[] strs, int len)
Java/14. longestCommonPrefix.java:51
↓ 1 callersMethodisEqualToPointFive
(Double num)
Java/829. ConsecutiveNumberSum.java:54
↓ 1 callersMethodisEqualToZero
(Double num)
Java/829. ConsecutiveNumberSum.java:59
↓ 1 callersMethodisGoodSplit
(int[] lh, int[] rh)
Java/1525.NumberOfGoodWaysToSplitAString.java:28
↓ 1 callersMethodisOneRowEnough
(self, word)
Python/500.KeyboardRow.py:6
↓ 1 callersFunctionisPalindrome
(s, x, y)
Python/5.LongestPalindromicSubstring.py:2
↓ 1 callersMethodisSame
(TreeNode s, TreeNode t)
Java/572. SubtreeOfAnotherTree.java:41
↓ 1 callersMethodissome
(self,s,t)
Python/572. SubtreeOfAnotherTree.py:58
↓ 1 callersMethodlengthOfLongestSubstring
:type s: str :rtype: int
Python/3. LongestSubstringWithoutRepeatingCharacters.py:4
↓ 1 callersFunctionlongestPalindrome
(s)
Python/5.LongestPalindromicSubstring.py:10
↓ 1 callersFunctionlongest_mountain_subarray
(a)
Python/longestMountatinSubarray..py:9
↓ 1 callersMethodmerge
(self,head_of_list1, head_of_list2)
Python/148. SortList.py:18
↓ 1 callersMethodmergeArrays
This function takes two sorted arrays and retuen the merged and sorted array.
Python/4. MedianOfTwoSortedArrays.py:21
↓ 1 callersMethodnumJewelsInStones
(self, J, S)
Python/771. Jewels and Stone.py:9
↓ 1 callersMethodnumTeamsDec
(int[] rating, int idx, int count)
Java/1395. Count number of teams.java:23
↓ 1 callersMethodnumTeamsInc
(int[] rating, int idx, int count)
Java/1395. Count number of teams.java:8
↓ 1 callersMethodpossible
(self,y,x,n)
Python/37. SudokuSolver.py:11
↓ 1 callersFunctionprintBoard
C++/51.NQueens.cpp:4
↓ 1 callersFunctionprint_zigzag
C++/103. BinaryTreeZigzagLevelOrderTraversal.cpp:17
↓ 1 callersMethodquery
(int tree[], int index, int s, int e, int qs, int qe)
Java/307. Range Sum Query - Mutable.java:51
↓ 1 callersMethodreverse
C++/7.ReverseInteger.cpp:3
↓ 1 callersMethodsearch
(self, grid, check, i, j)
Python/200. Number of Islands.py:95
↓ 1 callersMethodsearch
C++/704. BinarySearch.cpp:27
↓ 1 callersMethodsegregate
Separetes elements of the equation from string to list. >>>segregate("(1+(4+5+2)-3)+(6+8)") ['(', '(', 1, '+', '(', 4, '+',
Python/224. BasicCalculator.py:53
↓ 1 callersMethodsegregate
(self, s)
Python/227. BasicCalculatorII.py:37
↓ 1 callersMethodsolve
(self)
Python/37. SudokuSolver.py:30
↓ 1 callersMethodsolve
(int open, int close , String op,ArrayList res)
Java/22. generatePara.java:3
↓ 1 callersFunctionsolveNQueen
C++/51.NQueens.cpp:23
↓ 1 callersMethodstartsWith
Returns if there is any word in the trie that starts with the given prefix.
Python/208. ImplementTrie.py:41
↓ 1 callersFunctionthreeSum
C++/15. 3Sum.cpp:13
↓ 1 callersMethodtoLowerCase
C++/709. To Lower Case.cpp:9
↓ 1 callersMethodtopKFrequent
(int[] nums, int k)
Java/1053.topKFrequentElements.java:19
↓ 1 callersMethodtopKFrequent
(int[] nums, int k)
Java/Top_K_Frequent_Elements.java:19
↓ 1 callersMethodtraverse
(int i, int j, int currentIndex, Set<String> usedPairs)
Java/79. WordSearch.java:42
↓ 1 callersMethodupd
(int tree[], int index, int s, int e,int i, int value)
Java/307. Range Sum Query - Mutable.java:62
MethodBSTIterator
C++/173.BinarySearchTreeIterator.cpp:63
MethodContainsDuplicate
checks if the array contains a duplicate :param arr: List[int] a list of numbers :return: True or False if it contains a dupl
Python/217.ContainsDuplicate.py:5
MethodCount
()
Java/749. ContainVirus.java:36
MethodDinnerPlates
C++/1172. DinnerPlateStacks.cpp:36
next →1–100 of 846, ranked by callers