Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Ainevsia/Leetcode-Rust
/ functions
Functions
1,163 in github.com/Ainevsia/Leetcode-Rust
⨍
Functions
1,163
◇
Types & classes
350
↓ 205 callers
Method
push
(&mut self, elem: T)
1669. Minimum Cost to Cut a Stick/src/list.rs:21
↓ 157 callers
Method
iter
(&self)
1669. Minimum Cost to Cut a Stick/src/main.rs:129
↓ 66 callers
Method
pop
(&mut self)
1669. Minimum Cost to Cut a Stick/src/list.rs:30
↓ 46 callers
Method
insert
(mut intervals: Vec<Vec<i32>>, mut new_interval: Vec<i32>)
Merge Intervals/57. Insert Interval/src/main.rs:21
↓ 31 callers
Method
remove
(&mut self, n: i32)
Two Heaps/480. Sliding Window Median/src/main.rs:62
↓ 28 callers
Method
push
(&mut self, x: i32)
704. 二分查找/src/main.rs:82
↓ 27 callers
Method
peek
(&self)
1669. Minimum Cost to Cut a Stick/src/list.rs:37
↓ 26 callers
Method
into_iter
(self)
1669. Minimum Cost to Cut a Stick/src/list.rs:49
↓ 22 callers
Method
next
134. Gas Station/Solution.cpp:17
↓ 21 callers
Method
seat
(&mut self)
855. Count Unique Characters of All Substrings of a Given String/src/lib.rs:55
↓ 14 callers
Method
get
(root: &mut Trie, num: i32, x: i32)
1803. Average Waiting Time/src/lib.rs:29
↓ 10 callers
Method
iter_mut
(&mut self)
1669. Minimum Cost to Cut a Stick/src/main.rs:132
↓ 9 callers
Method
empty
(&self)
704. 二分查找/src/main.rs:106
↓ 9 callers
Method
find
(&self, mut p: (usize, usize))
Weekly Contest 181/1391. Check if There is a Valid Path in a Grid/src/main.rs:52
↓ 9 callers
Method
pop
(&mut self)
704. 二分查找/src/main.rs:86
↓ 8 callers
Method
swap
99. Recover Binary Search Tree/Solution.cpp:40
↓ 7 callers
Method
cmp
(&self, other: &Self)
23. Merge k Sorted Lists/src/main.rs:82
↓ 7 callers
Method
seat
(&mut self)
855. Count Unique Characters of All Substrings of a Given String/src/lib_bkup_ac.rs:15
↓ 6 callers
Method
insert
(&mut self, n: i32)
Two Heaps/480. Sliding Window Median/src/main.rs:47
↓ 6 callers
Method
leave
(&mut self, p: i32)
855. Count Unique Characters of All Substrings of a Given String/src/lib.rs:98
↓ 6 callers
Method
pow
O(1)
49. Group Anagrams/Solution.cpp:54
↓ 6 callers
Method
push
(&mut self, x: i32)
155. Min Stack/src/main.rs:24
↓ 6 callers
Method
union
(&mut self, p: (usize, usize), q: (usize, usize))
Weekly Contest 181/1391. Check if There is a Valid Path in a Grid/src/main.rs:59
↓ 6 callers
Function
ways_to_make_fair
(nums: Vec<i32>)
1664. Find Users With Valid E-Mails/src/lib.rs:1
↓ 5 callers
Method
add_element
(&mut self, num: i32)
1825. Find Minimum Time to Finish All Jobs/src/lib.rs:70
↓ 5 callers
Method
find
(&mut self, x: usize)
1632. Number of Good Ways to Split a String/src/lib.rs:13
↓ 5 callers
Method
has
(&self, p1: (usize, usize), p2: (usize, usize))
1444. Number of Steps to Reduce a Number to Zero/src/main.rs:58
↓ 5 callers
Method
reset
(&mut self)
30. Substring with Concatenation of All Words/src/main.rs:178
↓ 5 callers
Method
reverse
(s: &mut [char])
704. 二分查找/src/main.rs:279
↓ 5 callers
Function
square_sum
()
Two Pointers/202. Happy Number/src/main.rs:45
↓ 4 callers
Method
add_num
(&mut self, num: i32)
Two Heaps/295. Find Median from Data Stream/src/main.rs:32
↓ 4 callers
Method
checkIn
Weekly Contest 182/1396. Design Underground System/Solution.cpp:30
↓ 4 callers
Method
checkOut
Weekly Contest 182/1396. Design Underground System/Solution.cpp:35
↓ 4 callers
Method
getAverageTime
Weekly Contest 182/1396. Design Underground System/Solution.cpp:40
↓ 4 callers
Function
pow
()
1044. Longest Duplicate Substring/src/main.rs:81
↓ 4 callers
Method
pow
(x: usize, mut y: usize, modu: usize)
1044. Longest Duplicate Substring/src/main.rs:51
↓ 4 callers
Method
seat
(&mut self)
855. Count Unique Characters of All Substrings of a Given String/src/lib_bkup.rs:18
↓ 4 callers
Method
sum
( candidates: &[i32], target: i32, buf: &mut Vec<i32>, target_
39. Combination Sum/src/main.rs:18
↓ 3 callers
Method
calculate_mk_average
(&self)
1825. Find Minimum Time to Finish All Jobs/src/lib.rs:88
↓ 3 callers
Function
count_asterisks
(s: String)
2315. The Change in Global Rankings/src/lib.rs:1
↓ 3 callers
Method
dec
(&mut self)
30. Substring with Concatenation of All Words/src/main.rs:172
↓ 3 callers
Function
get_smallest_string
(n: i32, k: i32)
1663. Detect Cycles in 2D Grid/src/lib.rs:1
↓ 3 callers
Method
inc
(&mut self)
30. Substring with Concatenation of All Words/src/main.rs:169
↓ 3 callers
Method
intersection
(nums1: Vec<i32>, nums2: Vec<i32>)
704. 二分查找/src/main.rs:481
↓ 3 callers
Function
is_palindrome
()
131. Palindrome Partitioning/src/main.rs:50
↓ 3 callers
Method
peek_mut
(&mut self)
1669. Minimum Cost to Cut a Stick/src/list.rs:43
↓ 3 callers
Method
pop
Weekly Contest 180/1381. Design a Stack With Increment Operation/Solution.cpp:27
↓ 3 callers
Method
top
(&self)
155. Min Stack/src/main.rs:39
↓ 2 callers
Method
balance
(&mut self)
Two Heaps/480. Sliding Window Median/src/main.rs:86
↓ 2 callers
Function
cal
(w: &Vec<i32>, b: i32)
1815. Checking Existence of Edge Length Limited Paths/src/lib.rs:19
↓ 2 callers
Function
cloneGraph
(node *Node)
133. Clone Graph/solution.go:12
↓ 2 callers
Method
cmp
(&self, other: &Self)
855. Count Unique Characters of All Substrings of a Given String/src/lib.rs:40
↓ 2 callers
Method
exhausted
(&self)
30. Substring with Concatenation of All Words/src/main.rs:175
↓ 2 callers
Function
fail
()
Two Pointers/457. Circular Array Loop/src/main.rs:75
↓ 2 callers
Method
find_median
(&self)
Two Heaps/295. Find Median from Data Stream/src/main.rs:60
↓ 2 callers
Method
get
(&self, index: i32)
704. 二分查找/src/main.rs:600
↓ 2 callers
Method
get
(&self, i: usize)
Dynamic Programming/321. Create Maximum Number/src/main.rs:92
↓ 2 callers
Method
i2o
(&mut self)
704. 二分查找/src/main.rs:142
↓ 2 callers
Method
inc_expect
(&mut self)
30. Substring with Concatenation of All Words/src/main.rs:166
↓ 2 callers
Method
isPart
93. Restore IP Addresses/Solution.cpp:12
↓ 2 callers
Method
leave
(&mut self, p: i32)
855. Count Unique Characters of All Substrings of a Given String/src/lib_bkup_ac.rs:35
↓ 2 callers
Method
lowestCommonAncestor
https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/discuss/65225/4-lines-C%2B%2BJavaPythonRuby
Tree/236. Lowest Common Ancestor of a Binary Tree/Solution.cpp:16
↓ 2 callers
Function
merge_k_lists
(mut lists: Vec<Option<Box<ListNode>>>)
1669. Minimum Cost to Cut a Stick/src/main.rs:414
↓ 2 callers
Function
merge_two_lists
( mut list1: Option<Box<ListNode>>, mut list2: Option<Box<ListNode>>, )
1669. Minimum Cost to Cut a Stick/src/main.rs:461
↓ 2 callers
Function
print_type_of
(_: &T)
1759. Find the Missing IDs/src/main.rs:30
↓ 2 callers
Method
push
Weekly Contest 180/1381. Design a Stack With Increment Operation/Solution.cpp:22
↓ 2 callers
Function
testA
(a: &mut A)
1759. Find the Missing IDs/src/main.rs:51
↓ 1 callers
Function
a
()
1825. Find Minimum Time to Finish All Jobs/src/lib.rs:29
↓ 1 callers
Method
bt
22. Generate Parentheses/Solution.cpp:53
↓ 1 callers
Method
buildTree
105. Construct Binary Tree from Preorder and Inorder Traversal/Solution.cpp:42
↓ 1 callers
Method
cal
(&mut self, i:usize, j:usize)
44. Wildcard Matching/src/main.rs:98
↓ 1 callers
Method
checkValidString
678. Valid Parenthesis String/Solution.cpp:16
↓ 1 callers
Method
con
Weekly Contest 178/1367. Linked List in Binary Tree/Solution.cpp:33
↓ 1 callers
Method
connected
(&self, p: (usize, usize), q: (usize, usize))
Weekly Contest 181/1391. Check if There is a Valid Path in a Grid/src/main.rs:72
↓ 1 callers
Method
containsNearbyDuplicate
219. Contains Duplicate II/Solution.cpp:16
↓ 1 callers
Function
count_nice_pairs
(nums: Vec<i32>)
1814. Jump Game VI/src/lib.rs:1
↓ 1 callers
Method
findDisappearedNumbers
448. Find All Numbers Disappeared in an Array/Solution.cpp:10
↓ 1 callers
Method
findMaxLength
525. Contiguous Array/Solution.cpp:16
↓ 1 callers
Method
generateTheString
Weekly Contest 179/1374. Generate a String With Characters That Have Odd Counts/Solution.cpp:14
↓ 1 callers
Method
genp
22. Generate Parentheses/Solution.cpp:17
↓ 1 callers
Method
getIntersectionNode
two pointers */
160. Intersection of Two Linked Lists/Solution.cpp:14
↓ 1 callers
Method
get_res
(&self)
Tree/113. Path Sum II/src/main.rs:49
↓ 1 callers
Method
grayCode
it requires prior knowledge: the graycode can be converted from normal binary for n bits labeled from n-1, n-2, .. 0, here is the formula: GrayBit(i)
89. Gray Code/Solution.cpp:17
↓ 1 callers
Function
greatest_letter
(s: String)
2309. Maximize Number of Subsequences in a String/src/lib.rs:1
↓ 1 callers
Method
groupAnagrams
49. Group Anagrams/Solution.cpp:19
↓ 1 callers
Function
helper
(node: &Option<Rc<RefCell<TreeNode>>>, ret: &mut Vec<i32>)
1669. Minimum Cost to Cut a Stick/src/main.rs:505
↓ 1 callers
Method
hi
(self)
1759. Find the Missing IDs/src/main.rs:72
↓ 1 callers
Method
i
(&self)
32. Longest Valid Parentheses/src/main.rs:90
↓ 1 callers
Method
init
28. Implement strStr()/Solution.cpp:21
↓ 1 callers
Method
ipFromNPart
93. Restore IP Addresses/Solution.cpp:18
↓ 1 callers
Method
isValidBST
98. Validate Binary Search Tree/Solution.cpp:28
↓ 1 callers
Method
is_match
(s: S, p: S)
44. Wildcard Matching/src/main.rs:66
↓ 1 callers
Method
iter
(&self)
1669. Minimum Cost to Cut a Stick/src/list.rs:53
↓ 1 callers
Method
iter_mut
(&mut self)
1669. Minimum Cost to Cut a Stick/src/list.rs:57
↓ 1 callers
Method
judgePoint24
679. 24 Game/Solution.cpp:25
↓ 1 callers
Method
leave
(&mut self, p: i32)
855. Count Unique Characters of All Substrings of a Given String/src/lib_bkup.rs:39
↓ 1 callers
Method
longestPrefix
Rabin-Karp s contains only lowercase English letters. notice **longest** !
Weekly Contest 181/1392. Longest Happy Prefix/Solution.cpp:65
↓ 1 callers
Method
maxPerformance
Weekly Contest 180/1383. Maximum Performance of a Team/Solution.cpp:27
↓ 1 callers
Method
maxPoints
how to use 2 integers to represent a double if 0 -> up = 0, do not represent inf if has sign, sign is on the up
149. Max Points on a Line/Solution.cpp:35
↓ 1 callers
Method
maxProfit
reasonalbe : easy to reasion about
121. Best Time to Buy and Sell Stock/Solution.cpp:51
next →
1–100 of 1,163, ranked by callers