MCPcopy Create free account

hub / github.com/Jack-Cherish/LeetCode / functions

Functions82 in github.com/Jack-Cherish/LeetCode

↓ 16 callersMethodtop
Stack/Easy/155.Min Stack/Min Stack.cpp:20
↓ 11 callersMethodempty
Returns whether the stack is empty. */
Stack/Easy/225.Implement Stack using Queues/Implement Stack using Queues.cpp:31
↓ 11 callersMethodpop
Stack/Easy/155.Min Stack/Min Stack.cpp:13
↓ 7 callersMethodpush
Stack/Easy/155.Min Stack/Min Stack.cpp:7
↓ 5 callersMethodtop
Get the top element. */
Stack/Easy/225.Implement Stack using Queues/Implement Stack using Queues.cpp:26
↓ 4 callersMethodpop
Removes the element on top of the stack and returns that element. */
Stack/Easy/225.Implement Stack using Queues/Implement Stack using Queues.cpp:19
↓ 2 callersFunctionreverseList
* Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */
Linked List/Easy/234.Palindrome Linked List/Palindrome Linked List.c:8
↓ 1 callersMethodempty
Returns whether the queue is empty. */
Stack/Easy/232.Implement Queue using Stacks/Implement Queue using Stacks.cpp:28
↓ 1 callersMethodfind
(self, root, sum, ls, res)
Tree/Medium/113.Path Sum II/Path Sum II.py:21
↓ 1 callersMethodpop
Removes the element from in front of queue and returns that element. */
Stack/Easy/232.Implement Queue using Stacks/Implement Queue using Stacks.cpp:10
↓ 1 callersMethodpush
Push element x onto stack. */
Stack/Easy/225.Implement Stack using Queues/Implement Stack using Queues.cpp:10
↓ 1 callersMethodpush
Push element x to the back of queue. */
Stack/Easy/232.Implement Queue using Stacks/Implement Queue using Stacks.cpp:6
MethodMyStack
Initialize your data structure here. */
Stack/Easy/225.Implement Stack using Queues/Implement Stack using Queues.cpp:4
MethodaddBinary
:type a: str :type b: str :rtype: str
String/Easy/67.Add Binary/Add Binary.py:2
MethodaddBinary
String/Easy/67.Add Binary/67.Add Binary.cpp:3
MethodcheckRecord
:type s: str :rtype: bool
String/Easy/551. Student Attendance Record I/Student Attendance Record I.py:2
MethodcountAndSay
:type n: int :rtype: str
String/Easy/38.Count and Say/Count and Say.py:3
MethodcountSegments
String/Easy/434.Number of Segments in a String/Number of Segments in a String.cpp:13
MethodcountSegments
:type s: str :rtype: int
String/Easy/434.Number of Segments in a String/Number of Segments in a String.py:2
FunctiondeleteDuplicates
* Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */
Linked List/Easy/83.Remove Duplicates from Sorted List/Remove Duplicates from Sorted List.c:8
MethoddeleteDuplicates
Linked List/Easy/83.Remove Duplicates from Sorted List/Remove Duplicates from Sorted List.cpp:11
MethoddeleteDuplicates
:type head: ListNode :rtype: ListNode
Linked List/Easy/83.Remove Duplicates from Sorted List/Remove Duplicates from Sorted List.py:8
FunctiondeleteNode
* Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */
Linked List/Easy/237.Delete Node in a Linked List/Delete Node in a Linked List.c:8
MethoddeleteNode
:type node: ListNode :rtype: void Do not return anything, modify node in-place instead.
Linked List/Easy/237.Delete Node in a Linked List/Delete Node in a Linked List.py:8
Methoddepth
(node)
Tree/Easy/543.Diameter of Binary Tree/Diameter of Binary Tree.py:15
Methoddepth
Tree/Easy/543.Diameter of Binary Tree/Diameter of Binary Tree.cpp:19
MethoddetectCapitalUse
:type word: str :rtype: bool
String/Easy/520.Detect Capital/Detect Capital.py:2
MethoddetectCapitalUse
String/Easy/520.Detect Capital/Detect Capital.cpp:3
MethoddiameterOfBinaryTree
:type root: TreeNode :rtype: int
Tree/Easy/543.Diameter of Binary Tree/Diameter of Binary Tree.py:9
MethoddiameterOfBinaryTree
Tree/Easy/543.Diameter of Binary Tree/Diameter of Binary Tree.cpp:13
MethodevalRPN
Stack/Medium/150.Evaluate Reverse Polish Notation/Evaluate Reverse Polish Notation.cpp:3
MethodfindLUSlength
:type a: str :type b: str :rtype: int
String/Easy/521.Longest Uncommon Subsequence I/Longest Uncommon Subsequence I.py:2
MethodfindMode
Tree/Easy/501.Find Mode in Binary Search Tree/Find Mode in Binary Search Tree.cpp:12
MethodfindMode
:type root: TreeNode :rtype: List[int]
Tree/Easy/501.Find Mode in Binary Search Tree/Find Mode in Binary Search Tree.py:9
FunctiongetIntersectionNode
* Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */
Linked List/Easy/160.Intersection of Two Linked Lists/Intersection of Two Linked Lists.c:8
MethodgetIntersectionNode
:type head1, head1: ListNode :rtype: ListNode
Linked List/Easy/160.Intersection of Two Linked Lists/Intersection of Two Linked Lists.py:8
MethodgetIntersectionNode
Linked List/Easy/160.Intersection of Two Linked Lists/Intersection of Two Linked Lists.cpp:11
MethodgetLength
Linked List/Easy/160.Intersection of Two Linked Lists/Intersection of Two Linked Lists.cpp:37
MethodgetMin
Stack/Easy/155.Min Stack/Min Stack.cpp:29
FunctionhasCycle
* Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */
Linked List/Easy/141.Linked List Cycle/Linked List Cycle.c:8
MethodhasCycle
:type head: ListNode :rtype: bool
Linked List/Easy/141.Linked List Cycle/Linked List Cycle.py:8
MethodhasCycle
Linked List/Easy/141.Linked List Cycle/Linked List Cycle.cpp:11
MethodhasPathSum
:type root: TreeNode :type sum: int :rtype: bool
Tree/Easy/112.Path Sum/Path Sum-2.py:9
MethodhasPathSum
:type root: TreeNode :type sum: int :rtype: bool
Tree/Easy/112.Path Sum/Path Sum-1.py:9
MethodhasPathSum
Tree/Easy/112.Path Sum/Path Sum.cpp:12
FunctionisPalindrome
Linked List/Easy/234.Palindrome Linked List/Palindrome Linked List.c:22
MethodisPalindrome
Linked List/Easy/234.Palindrome Linked List/Palindrome Linked List.cpp:11
MethodisPalindrome
:type head: ListNode :rtype: bool
Linked List/Easy/234.Palindrome Linked List/Palindrome.py:8
MethodisValid
Stack/Easy/20.Valid Parentheses/Valid Parentheses.cpp:3
MethodjudgeCircle
:type moves: str :rtype: bool
String/Easy/657.Judge Route Circle/Judge Route Circle.py:2
Methodlcp
(self, str1, str2)
String/Easy/14.Longest Common Prefix/Longest Common Prefix.py:19
MethodlongestCommonPrefix
:type strs: List[str] :rtype: str
String/Easy/14.Longest Common Prefix/Longest Common Prefix.py:3
MethodlowestCommonAncestor
:type root: TreeNode :type p: TreeNode :type q: TreeNode :rtype: TreeNode
Tree/Easy/235.Lowest Common Ancestor of a Binary Search Tree/Lowest Common Ancestor of a Binary Search Tree-1.py:9
MethodlowestCommonAncestor
Tree/Easy/235.Lowest Common Ancestor of a Binary Search Tree/Lowest Common Ancestor of a Binary Search Tree.cpp:12
MethodlowestCommonAncestor
:type root: TreeNode :type p: TreeNode :type q: TreeNode :rtype: TreeNode
Tree/Easy/235.Lowest Common Ancestor of a Binary Search Tree/Lowest Common Ancestor of a Binary Search Tree-2.py:9
FunctionmergeTwoLists
* Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */
Linked List/Easy/21.Merge Two Sorted Lists/Merge Two Sorted Lists.c:8
MethodmergeTwoLists
Linked List/Easy/21.Merge Two Sorted Lists/Merge Two Sorted Lists.cpp:11
MethodmergeTwoLists
:type l1: ListNode :type l2: ListNode :rtype: ListNode
Linked List/Easy/21.Merge Two Sorted Lists/Merge Two Sorted Lists.py:8
MethodminDepth
:type root: TreeNode :rtype: int
Tree/Easy/111.Minimum Depth of Binary Tree/Minimum Depth of Binary Tree-2.py:9
MethodminDepth
Tree/Easy/111.Minimum Depth of Binary Tree/Minimum Depth of Binary Tree.cpp:12
MethodminDepth
:type root: TreeNode :rtype: int
Tree/Easy/111.Minimum Depth of Binary Tree/Minimum Depth of Binary Tree-1.py:9
MethodnextGreaterElement
Stack/Easy/496.Next Greater Element I/Next Greater Element I.cpp:3
MethodpathSum
:type root: TreeNode :type sum: int :rtype: List[List[int]]
Tree/Medium/113.Path Sum II/Path Sum II.py:9
Methodpeek
Get the front element. */
Stack/Easy/232.Implement Queue using Stacks/Implement Queue using Stacks.cpp:17
FunctionremoveElements
* Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */
Linked List/Easy/203.Remove Linked List Elements/Remove Linked List Elements.c:8
MethodremoveElements
Linked List/Easy/203.Remove Linked List Elements/Remove Linked List Elements.cpp:11
FunctionreverseList
* Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */
Linked List/Easy/206.Reverse Linked List/Reverse Linked List-recursively.c:8
FunctionreverseList
* Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */
Linked List/Easy/206.Reverse Linked List/Reverse Linked List-iteratively.c:8
MethodreverseList
Linked List/Easy/234.Palindrome Linked List/Palindrome Linked List.cpp:31
MethodreverseList
:type head: ListNode :rtype: ListNode
Linked List/Easy/206.Reverse Linked List/Reverse Linked List.py:8
MethodreverseStr
String/Easy/541.Reverse String II/Reverse String II.cpp:3
MethodreverseStr
:type s: str :type k: int :rtype: str
String/Easy/541.Reverse String II/Reverse String II.py:2
MethodreverseString
String/Easy/344.Reverse String/Reverse String.cpp:3
MethodreverseString
:type s: str :rtype: str
String/Easy/344.Reverse String/Reverse String.py:2
MethodreverseWords
:type s: str :rtype: str
String/Easy/557.Reverse Words in a String III/Reverse Words in a String III.py:2
MethodreverseWords
String/Easy/557.Reverse Words in a String III/Reverse Words in a String III.cpp:3
MethodromanToInt
:type s: str :rtype: int
String/Easy/13.Roman to Integer/Roman to Integer.py:2
FunctionrotateRight
* Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */
Linked List/Medium/61.Rotate List/Rotate List.c:8
MethodrotateRight
Linked List/Medium/61.Rotate List/Rotate List.cpp:11
MethodrotateRight
:type head: ListNode :type k: int :rtype: ListNode
Linked List/Medium/61.Rotate List/Rotate List.py:9
Methodtree2str
Tree/Easy/606.Construct String from Binary Tree/Construct String from Binary Tree.cpp:12
Methodtree2str
:type t: TreeNode :rtype: str
Tree/Easy/606.Construct String from Binary Tree/Construct String from Binary Tree.py:9