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
Method
count_odd
(mut arr: Vec<i32>)
782. Transform to Chessboard/src/main.rs:44
Method
count_pairs
(nums: Vec<i32>, low: i32, high: i32)
1803. Average Waiting Time/src/lib.rs:13
Function
count_points
(points: Vec<Vec<i32>>, queries: Vec<Vec<i32>>)
1828. Count Ways to Distribute Candies/src/lib.rs:1
Method
count_routes
(locations: Vec<i32>, start: i32, finish: i32, fuel: i32)
1575. Maximum Area of a Piece of Cake After Horizontal and Vertical Cuts/src/lib.rs:4
Method
crack_safe
(n: i32, k: i32)
753. Open the Lock/src/lib.rs:4
Method
createTargetArray
Weekly Contest 181/1389. Create Target Array in the Given Order/Solution.cpp:15
Method
daily_temperatures
单调栈的本质是以空间换时间,记录之前已访问过的非递增子序列下标
cn/739. 每日温度/src/main.rs:301
Method
days_between_dates
(date1: String, date2: String)
Weekly Contest 177/1360. Number of Days Between Two Dates/src/main.rs:12
Method
deal_with_even
(board: Vec<Vec<i32>>)
782. Transform to Chessboard/src/main.rs:107
Method
deal_with_odd
(board: Vec<Vec<i32>>)
782. Transform to Chessboard/src/main.rs:98
Method
debug
(&self)
Dynamic Programming/321. Create Maximum Number/src/main.rs:96
Function
decode_message
(key: String, message: String)
1669. Minimum Cost to Cut a Stick/src/main.rs:569
Method
deepcopy
95. Unique Binary Search Trees II/Solution.cpp:55
Method
deleteDuplicates
82. Remove Duplicates from Sorted List II/Solution.cpp:12
Method
deleteDuplicates
this is a non recursive version
83. Remove Duplicates from Sorted List/Solution.cpp:20
Method
delete_at_index
(&mut self, index: i32)
704. 二分查找/src/main.rs:660
Function
delete_duplicates
(mut head: Option<Box<ListNode>>)
1669. Minimum Cost to Cut a Stick/src/main.rs:392
Method
delete_duplicates
[not implemented] use c++
82. Remove Duplicates from Sorted List II/src/main.rs:37
Method
depth
543. Diameter of Binary Tree/Solution.cpp:27
Method
deserialize
(s_: String)
cn/385. 迷你语法分析器/src/main.rs:17
Method
dfs
p -> possibility to reach this node `id`
Weekly Contest 179/p4/Solution.cpp:30
Method
dfs
Weekly Contest 179/p3/Solution.cpp:17
Method
diameterOfBinaryTree
543. Diameter of Binary Tree/Solution.cpp:34
Method
divide
(dividend: i32, divisor: i32)
29. Divide Two Integers/src/main.rs:11
Method
drop
(&mut self)
1669. Minimum Cost to Cut a Stick/src/list.rs:63
Function
edge
()
30. Substring with Concatenation of All Words/src/main.rs:281
Function
edge
()
42. Trapping Rain Water/src/main.rs:51
Function
edge
()
92. Reverse Linked List II/src/main.rs:115
Function
edge
()
29. Divide Two Integers/src/main.rs:49
Function
edge
()
61. Rotate List/src/main.rs:111
Function
edge
()
54. Spiral Matrix/src/main.rs:54
Function
edge
()
32. Longest Valid Parentheses/src/main.rs:112
Function
edge
()
Two Pointers/75. Sort Colors/src/main.rs:55
Function
edge
()
Topological Sort/310. Minimum Height Trees/src/main.rs:55
Function
edge
()
45. Jump Game II/src/main.rs:44
Function
edge
()
44. Wildcard Matching/src/main.rs:145
Function
edge
()
47. Permutations II/src/main.rs:68
Function
edge
()
Sliding Window/992. Subarrays with K Different Integers/src/main.rs:54
Function
edge
()
31. Next Permutation/src/main.rs:57
Function
edge
()
74. Search a 2D Matrix/src/main.rs:49
Method
eval_rpn
(tokens: Vec<String>)
704. 二分查找/src/main.rs:9
Method
evaluate
(s: String, knowledge: Vec<Vec<String>>)
1807. Partitioning Into Minimum Number Of Deci-Binary Numbers/src/lib.rs:4
Function
even
()
33. Search in Rotated Sorted Array/src/main.rs:71
Function
even_not_found
()
33. Search in Rotated Sorted Array/src/main.rs:95
Function
example
()
50. Pow(x, n)/src/main.rs:33
Method
exist
(board: Vec<Vec<char>>, word: String)
79. Word Search/src/main.rs:8
Method
f
(mut n: i32)
704. 二分查找/src/main.rs:461
Method
f
(v: &Vec<i32>)
1289. Day of the Week/src/lib.rs:16
Method
f
(nums: &Vec<i32>, x: i32)
1803. Average Waiting Time/src/lib.rs:17
Method
factorial
used for small num a: a!
60. Permutation Sequence/src/main.rs:23
Function
fail
()
213. House Robber II/src/main.rs:47
Function
fail
()
65. Valid Number/src/main.rs:126
Function
fail
()
316. Remove Duplicate Letters/src/main.rs:58
Function
fail
()
Weekly Contest 177/1363. Largest Multiple of Three/src/main.rs:97
Function
fail
()
927. Three Equal Parts/src/main.rs:67
Function
fail
()
81. Search in Rotated Sorted Array II/src/main.rs:59
Function
fail
()
Sliding Window/904. Fruit Into Baskets/src/main.rs:54
Function
fail
()
678. Valid Parenthesis String/src/main.rs:58
Function
fail
()
Dynamic Programming/321. Create Maximum Number/src/main.rs:124
Function
fail
()
135. Candy/src/main.rs:52
Function
fail
()
91. Decode Ways/src/main.rs:37
Function
fail
()
639. Decode Ways II/src/main.rs:62
Method
fail
reach a fail node, fail this way
Two Pointers/457. Circular Array Loop/src/main.rs:49
Function
fail1
()
Two Heaps/480. Sliding Window Median/src/main.rs:140
Function
fail2
()
Two Heaps/480. Sliding Window Median/src/main.rs:148
Method
fast_pow
343. Integer Break/Solution.cpp:29
Method
fill
(matrix: &mut Vec<Vec<i32>>, offset: usize, width: usize, start: i32)
59. Spiral Matrix II/src/main.rs:15
Method
findGoodStrings
Weekly Contest 182/1397. Find All Good Strings/Solution.cpp:15
Method
findKthLargest
215. Kth Largest Element in an Array/Solution.cpp:28
Method
findLucky
Weekly Contest 182/1394. Find Lucky Integer in an Array/Solution.cpp:16
Method
findLucky
Weekly Contest 182/1394. Find Lucky Integer in an Array/Solution.cpp:34
Method
find_duplicate
循环置换 fast/slow pointers find the entry point of the loop
Cyclic Sort/287. Find the Duplicate Number/src/main.rs:9
Method
find_max_length
(nums: Vec<i32>)
525. Contiguous Array/src/main.rs:8
Method
find_median_sorted_arrays
(nums1: Vec<i32>, nums2: Vec<i32>)
4. Median of Two Sorted Arrays/src/main.rs:13
Method
find_min_height_trees
(n: i32, edges: Vec<Vec<i32>>)
Topological Sort/310. Minimum Height Trees/src/main.rs:10
Method
find_order
(num_courses: i32, prerequisites: Vec<Vec<i32>>)
Topological Sort/210. Course Schedule II/src/main.rs:8
Method
find_paths
(m: i32, n: i32, max_move: i32, start_row: i32, start_column: i32)
576. Out of Boundary Paths/src/lib.rs:4
Method
find_substring
(s: String, words: Vec<String>)
30. Substring with Concatenation of All Words/src/main.rs:78
Method
find_substring_good
(s: String, words: Vec<String>)
30. Substring with Concatenation of All Words/src/main.rs:185
Method
find_substring_permutation
(s: String, words: Vec<String>)
30. Substring with Concatenation of All Words/src/main.rs:38
Function
finding_users_active_minutes
(logs: Vec<Vec<i32>>, k: i32)
1817. Calculate Money in Leetcode Bank/src/lib.rs:1
Method
first_missing_positive
(mut nums: Vec<i32>)
41. First Missing Positive/src/main.rs:8
Method
four_sum
(mut v: Vec<i32>, t: i32)
704. 二分查找/src/main.rs:342
Method
four_sum
this function owns the nums and ret
18. 4Sum/src/main.rs:9
Method
four_sum_count
(nums1: Vec<i32>, nums2: Vec<i32>, nums3: Vec<i32>, nums4: Vec<i32>)
704. 二分查找/src/main.rs:390
Method
four_sum_count2
(nums1: Vec<i32>, nums2: Vec<i32>, nums3: Vec<i32>, nums4: Vec<i32>)
704. 二分查找/src/main.rs:415
Method
frogPosition
Weekly Contest 179/p4/Solution.cpp:45
Function
g
()
1669. Minimum Cost to Cut a Stick/src/main.rs:158
Method
gcd
(a: usize, b: usize)
1819. Construct the Lexicographically Largest Valid Sequence/src/lib.rs:84
Method
gcd
149. Max Points on a Line/Solution.cpp:17
Method
gcd2
(a: i32, b: i32)
1819. Construct the Lexicographically Largest Valid Sequence/src/lib.rs:79
Method
gen
(res: &mut Vec<String>, l: i32, r: i32, front: &mut String)
22. Generate Parentheses/src/main.rs:15
Method
generateParenthesis
backtracing The idea is intuitive. Use two integers to count the remaining left parenthesis (n) and the right parenthesis (m) to be
22. Generate Parentheses/Solution.cpp:46
Method
generateParenthesis_recur
recursive : returning the result back
22. Generate Parentheses/Solution.cpp:13
Method
generateTrees
95. Unique Binary Search Trees II/Solution.cpp:21
Method
generate_matrix
(n: i32)
704. 二分查找/src/main.rs:843
Method
generate_matrix
(n: i32)
59. Spiral Matrix II/src/main.rs:8
Method
generate_parenthesis
(n: i32)
22. Generate Parentheses/src/main.rs:8
Method
get
(d: &str)
Weekly Contest 177/1360. Number of Days Between Two Dates/src/main.rs:16
Method
getHash
49. Group Anagrams/Solution.cpp:40
← previous
next →
401–500 of 1,163, ranked by callers