MCPcopy Create free account

hub / github.com/Cee/Leetcode / functions

Functions840 in github.com/Cee/Leetcode

MethoddeleteNode
(ListNode node)
237 - Delete Node in a Linked List.java:10
MethoddepthSum
(List<NestedInteger> nestedList)
339 - Nested List Weight Sum.java:30
Methoddeserialize
(String data)
297 - Serialize and Deserialize Binary Tree.java:29
Methoddeserialize
(String data)
428 - Serialize and Deserialize N-ary Tree.java:36
Methoddeserialize
(String data)
449 - Serialize and Deserialize BST.java:31
MethoddiameterOfBinaryTree
(TreeNode root)
543 - Diameter of Binary Tree.java:12
MethoddiffWaysToCompute
(String input)
241 - Different Ways to Add Parentheses.java:2
MethoddistanceK
(TreeNode root, TreeNode target, int K)
863 - All Nodes Distance K in Binary Tree.java:12
MethoddistributeCandies
(int[] candies)
575 - Distribute Candies.java:2
Methoddivide
(int dividend, int divisor)
29 - Divide Two Integers.java:39
MethodenQueue
Insert an element into the circular queue. Return true if the operation is successful.
622 - Design Circular Queue.java:16
Methodencode
(List<String> strs)
271 - Encode and Decode Strings.java:4
Methodencode
(String longUrl)
535 - Encode and Decode TinyURL.java:7
MethodevalRPN
(String[] tokens)
150 - Evaluate Reverse Polish Notation.java:2
Methodevaluate
(String expression)
736 - Parse Lisp Expression.java:4
MethodexclusiveTime
(int n, List<String> logs)
636 - Exclusive Time of Functions.java:2
Methodexist
(char[][] board, String word)
79 - Word Search.java:3
MethodexpressiveWords
(String S, String[] words)
809 - Expressive Words.java:25
Methodf
(String prefix, String suffix)
745 - Prefix and Suffix Search.java:88
Methodfind
Find if there exists any pair of numbers which sum is equal to the value.
170 - Two Sum III - Data structure design.java:21
MethodfindAnagrams
(String s, String p)
438 - Find All Anagrams in a String.java:2
MethodfindAndReplacePattern
(String[] words, String pattern)
890 - Find and Replace Pattern.java:2
MethodfindCelebrity
(int n)
277 - Find the Celebrity.java:5
MethodfindCheapestPrice
(int n, int[][] flights, int src, int dst, int K)
787 - Cheapest Flights Within K Stops.java:40
MethodfindCircleNum
(int[][] M)
547 - Friend Circles.java:26
MethodfindClosestElements
(int[] arr, int k, int x)
658 - Find K Closest Elements.java:2
MethodfindClosestLeaf
(TreeNode root, int k)
742 - Closest Leaf in a Binary Tree.java:13
MethodfindComplement
(int num)
476 - Number Complement.java:2
MethodfindContestMatch
(int n)
544 - Output Contest Matches.java:2
MethodfindDiagonalOrder
(int[][] matrix)
498 - Diagonal Traverse.java:2
MethodfindDisappearedNumbers
(int[] nums)
448 - Find All Numbers Disappeared in an Array.java:2
MethodfindDuplicate
(int[] nums)
287 - Find the Duplicate Number.java:2
MethodfindDuplicateSubtrees
(TreeNode root)
652 - Find Duplicate Subtrees.java:13
MethodfindKthLargest
(int[] nums, int k)
215 - Kth Largest Element in an Array.java:2
MethodfindLadders
(String beginWord, String endWord, List<String> wordList)
126 - Word Ladder II.java:2
MethodfindLengthOfLCIS
(int[] nums)
674 - Longest Continuous Increasing Subsequence.java:2
MethodfindLongestWord
(String s, List < String > d)
524 - Longest Word in Dictionary through Deleting.java:9
MethodfindMaxAverage
(int[] nums, int k)
643 - Maximum Average Subarray I.java:2
MethodfindMaximumXOR
(int[] nums)
421 - Maximum XOR of Two Numbers in an Array.java:2
MethodfindMedian
()
295 - Find Median from Data Stream.java:19
MethodfindMedianSortedArrays
(int[] nums1, int[] nums2)
4 - Median of Two Sorted Arrays.java:2
MethodfindMin
(int[] nums)
153 - Find Minimum in Rotated Sorted Array.java:2
MethodfindMinArrowShots
(int[][] points)
452 - Minimum Number of Arrows to Burst Balloons.java:2
MethodfindMinHeightTrees
(int n, int[][] edges)
310 - Minimum Height Trees.java:2
MethodfindMissingRanges
(int[] nums, int lower, int upper)
163 - Missing Ranges.java:2
MethodfindNumberOfLIS
(int[] nums)
673 - Number of Longest Increasing Subsequence.java:2
MethodfindOrder
(int numCourses, int[][] prerequisites)
210 - Course Schedule II.java:2
MethodfindPeakElement
(int[] nums)
162 - Find Peak Element.java:2
MethodfindRedundantConnection
(int[][] edges)
684 - Redundant Connection.java:29
MethodfindReplaceString
(String S, int[] indexes, String[] sources, String[] targets)
833 - Find And Replace in String.java:12
MethodfindSecretWord
(String[] wordlist, Master master)
843 - Guess the Word.java:10
MethodfindStrobogrammatic
(int n)
247 - Strobogrammatic Number II.java:2
MethodfindSubsequences
(int[] nums)
491 - Increasing Subsequences.java:3
MethodfindSubstring
(String s, String[] words)
30 - Substring with Concatenation of All Words.java:2
MethodfindSubstrings
(String s)
Two Sigma.java:9
MethodfindTarget
(TreeNode root, int k)
653 - Two Sum IV - Input is a BST.java:14
MethodfindTargetSumWays
(int[] nums, int s)
494 - Target Sum.java:2
MethodfindWords
(String[] words)
500 - Keyboard Row.java:2
MethodfindWords
(char[][] board, String[] words)
212 - Word Search II.java:2
MethodfirstBadVersion
(int n)
278 - First Bad Version.java:5
MethodfirstMissingPositive
(int[] nums)
41 - First Missing Positive.java:2
MethodfirstUniqChar
(String s)
387 - First Unique Character in a String.java:2
MethodfizzBuzz
(int n)
412 - Fizz Buzz.java:2
Methodflatten
(TreeNode root)
114 - Flatten Binary Tree to Linked List.java:13
Methodflatten
(Node head)
430 - Flatten a Multilevel Doubly Linked List.java:20
MethodflipAndInvertImage
(int[][] A)
832 - Flipping an Image.java:2
MethodfourSum
(int[] nums, int target)
18 - 4Sum.java:2
MethodfractionToDecimal
(int numerator, int denominator)
166 - Fraction to Recurring Decimal.java:2
MethodfrequencySort
(String s)
451 - Sort Characters By Frequency.java:3
MethodfullJustify
(String[] words, int maxWidth)
68 - Text Justification.java:2
MethodgameOfLife
(int[][] board)
289 - Game of Life.java:2
Methodgenerate
(int numRows)
118 - Pascal's Triangle.java:2
MethodgenerateAbbreviations
(String word)
320 - Generalized Abbreviation.java:6
MethodgenerateParenthesis
(int n)
22 - Generate Parentheses.java:3
MethodgeneratePossibleNextMoves
(String s)
293 - Flip Game.java:2
Methodget
Provide a number which is not assigned to anyone. @return - Return an available number. Return -1 if none is available.
379 - Design Phone Directory.java:14
Methodget
Returns the value to which the specified key is mapped, or -1 if this map contains no mapping for the key
706 - Design HashMap.java:18
MethodgetHint
(String secret, String guess)
299 - Bulls and Cows.java:2
MethodgetHits
Return the number of hits in the past 5 minutes. @param timestamp - The current timestamp (in seconds granularity).
362 - Design Hit Counter.java:28
MethodgetIntersectionNode
(ListNode headA, ListNode headB)
160 - Intersection of Two Linked Lists.java:13
MethodgetIntervals
()
352 - Data Stream as Disjoint Intervals.java:39
MethodgetMin
()
155 - Min Stack.java:29
MethodgetMoneyAmount
(int n)
375 - Guess Number Higher or Lower II.java:30
MethodgetRandom
Get a random element from the set.
380 - Insert Delete GetRandom O(1).java:38
MethodgetRandom
Get a random element from the collection.
381 - Insert Delete GetRandom O(1) - Duplicates allowed.java:46
MethodgetRandom
Returns a random node's value.
382 - Linked List Random Node.java:21
MethodgetSkyline
(int[][] buildings)
218 - The Skyline Problem.java:14
MethodgetSum
(int a, int b)
371 - Sum of Two Integers.java:2
Methodget_root
()
919 - Complete Binary Tree Inserter.java:46
MethodgroupAnagrams
(String[] strs)
49 - Group Anagrams.java:2
MethodgroupStrings
(String[] strings)
249 - Group Shifted Strings.java:2
MethodguessNumber
(int n)
374 - Guess Number Higher or Lower.java:7
MethodhIndex
(int[] citations)
274 - H-Index.java:2
MethodhammingDistance
(int x, int y)
461 - Hamming Distance.java:2
MethodhammingWeight
(int n)
191 - Number of 1 Bits.java:3
MethodhasCycle
(ListNode head)
141 - Linked List Cycle.java:13
MethodhasGroupsSizeX
(int[] deck)
914 - X of a Kind in a Deck of Cards.java:2
MethodhasNext
@return whether we have a next smallest number
173 - Binary Search Tree Iterator.java:21
MethodhasNext
()
341 - Flatten Nested List Iterator.java:33
MethodhasPath
(int[][] maze, int[] start, int[] destination)
490 - The Maze.java:5
← previousnext →401–500 of 840, ranked by callers