Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Aloxaf/LeetCode-Rust
/ functions
Functions
279 in github.com/Aloxaf/LeetCode-Rust
⨍
Functions
279
◇
Types & classes
94
↓ 56 callers
Method
push
每次都将 x - self.min 存入栈内, 并视情况更新 self.min
src/min_stack.rs:21
↓ 15 callers
Method
pop
弹出一个元素, 若弹出元素小于0, 说明该元素比原先的 self.min(old) 大, 并且它是现在的最小元素 即 self.min(now) - self.min(old) = pop
src/min_stack.rs:36
↓ 11 callers
Method
get
(&self, key: i32)
src/design_hashmap.rs:90
↓ 9 callers
Method
insert
Inserts a word into the trie. */
src/implement_trie_prefix_tree.rs:14
↓ 7 callers
Method
get
Get the value of the index-th node in the linked list. If the index is invalid, return -1. */
src/design_linked_list.rs:45
↓ 5 callers
Method
push
(&mut self, key: i32, val: i32)
src/design_hashmap.rs:52
↓ 4 callers
Method
find
(&self, word: String)
src/implement_trie_prefix_tree.rs:28
↓ 4 callers
Method
remove_by_key
(&mut self, key: i32)
src/design_hashmap.rs:94
↓ 4 callers
Method
reverse
(x: i32)
src/reverse_integer.rs:3
↓ 3 callers
Function
backtrack
(b: &mut Bencher)
src/generate_parentheses.rs:78
↓ 3 callers
Method
find_by_key
(&self, key: i32)
src/design_hashmap.rs:78
↓ 3 callers
Method
locate
(&self, index: i32)
src/design_linked_list.rs:64
↓ 2 callers
Method
add_at_index
Add a node of value val before the index-th node in the linked list. If index equals to the length of linked list, the node will be appended to the en
src/design_linked_list.rs:83
↓ 2 callers
Function
basic_test
(f: fn(Vec<i32>, i32) -> i32)
src/kth_largest_element_in_an_array.rs:23
↓ 2 callers
Method
move_to_output
(&mut self)
src/implement_queue_using_stacks.rs:28
↓ 1 callers
Method
flatten
https://leetcode.com/problems/flatten-binary-tree-to-linked-list/discuss/36977/My-short-post-order-traversal-Java-solution-for-share NB, 相形见绌 我佛了
src/flatten_binary_tree_to_linked_list.rs:10
↓ 1 callers
Method
peek
Get the front element. */
src/implement_queue_using_stacks.rs:42
↓ 1 callers
Method
pop
(&mut self)
src/implement_queue_using_stacks.rs:36
↓ 1 callers
Method
push
Push element x to the back of queue. */
src/implement_queue_using_stacks.rs:22
↓ 1 callers
Method
rotate_right
(head: Option<Box<ListNode>>, mut k: i32)
src/rotate_list.rs:2
Method
_is_match
超时的简单粗暴的垃圾算法
src/wildcard_matching.rs:42
Function
_unsafe
(b: &mut Bencher)
src/rotate_list.rs:129
Method
add_at_head
Add a node of value val before the first element of the linked list. After the insertion, the new node will be the first node of the linked list. */
src/design_linked_list.rs:53
Method
add_at_tail
Append a node of value val to the last element of the linked list. */
src/design_linked_list.rs:58
Method
add_binary
(a: String, b: String)
src/add_binary.rs:2
Method
add_digits
https://en.wikipedia.org/wiki/Digital_root#Congruence_formula
src/add_digits.rs:12
Method
add_digits_recursive
(num: i32)
src/add_digits.rs:2
Method
add_strings
(num1: S, num2: S)
src/add_strings.rs:2
Method
add_two_numbers
( l1: Option<Box<ListNode>>, l2: Option<Box<ListNode>>, )
src/add_two_numbers.rs:4
Method
add_word
Adds a word into the data structure. */
src/add_and_search_word_data_structure_design.rs:22
Method
all_possible_fbt
(n: i32)
src/all_possible_full_binary_trees.rs:8
Method
alphabet_board_path
(target: String)
src/alphabet_board_path.rs:2
Method
asteroid_collision
(asteroids: Vec<i32>)
src/asteroid_collision.rs:2
Method
backtrack
(ret: &mut Vec<String>, now: String, left: i32, right: i32, n: i32)
src/generate_parentheses.rs:3
Function
bench
(b: &mut Bencher)
src/reverse_string.rs:42
Function
bench
(b: &mut Bencher)
src/implement_trie_prefix_tree.rs:76
Function
bench
(b: &mut Bencher)
src/zigzag_conversion.rs:39
Function
bench_unsafe
(b: &mut Bencher)
src/reverse_string.rs:47
Function
bin
()
src/powx_n.rs:67
Function
bit
()
src/powx_n.rs:74
Function
builtin
()
src/same_tree.rs:36
Function
builtin
()
src/powx_n.rs:53
Function
builtin
(b: &mut Bencher)
src/counting_bits.rs:41
Function
builtin
(b: &mut Bencher)
src/length_of_last_word.rs:36
Function
builtin
()
src/find_first_and_last_position_of_element_in_sorted_array.rs:60
Function
builtin
(b: &mut Bencher)
src/rotate_array.rs:80
Method
c2i
(c: u8)
src/roman_to_integer.rs:3
Method
calc
(nums: &mut Vec<i32>, op: u8)
src/basic_calculator_ii.rs:13
Method
calc
(nums: Vec<i32>, ops: Vec<u8>)
src/basic_calculator.rs:4
Method
calculate
(s: String)
src/basic_calculator_ii.rs:25
Method
calculate
(s: String)
src/basic_calculator.rs:15
Method
check_possibility
(nums: Vec<i32>)
src/non_decreasing_array.rs:2
Method
climb_stairs
(n: i32)
src/climbing_stairs.rs:2
Function
clourse_number
(b: &mut Bencher)
src/generate_parentheses.rs:83
Method
convert
(s: String, num_rows: i32)
src/zigzag_conversion.rs:2
Method
convert_to_title
(mut n: i32)
src/excel_sheet_column_title.rs:2
Method
core
(node: &mut Node, mut next: Node)
src/flatten_binary_tree_to_linked_list.rs:11
Method
count_and_say
(n: i32)
src/count_and_say.rs:2
Method
count_bits
(num: i32)
src/counting_bits.rs:2
Method
count_bits_builtin
(num: i32)
src/counting_bits.rs:11
Method
count_primes
(n: i32)
src/count_primes.rs:2
Method
create_target_array
(nums: Vec<i32>, index: Vec<i32>)
src/create_target_array_in_the_given_order.rs:2
Function
custom
(b: &mut Bencher)
src/counting_bits.rs:36
Function
custom
(b: &mut Bencher)
src/length_of_last_word.rs:31
Function
custom
()
src/find_first_and_last_position_of_element_in_sorted_array.rs:53
Method
delete_at_index
Delete the index-th node in the linked list, if the index is valid. */
src/design_linked_list.rs:106
Method
delete_duplicates
(mut head: Option<Box<ListNode>>)
src/remove_duplicates_from_sorted_list.rs:4
Function
drain_append
(b: &mut Bencher)
src/rotate_array.rs:72
Method
empty
Returns whether the queue is empty. */
src/implement_queue_using_stacks.rs:48
Method
empty
Returns whether the stack is empty. */
src/implement_stack_using_queues.rs:41
Method
eval_rpn
(tokens: Vec<String>)
src/evaluate_reverse_polish_notation.rs:2
Method
expand
感觉写得很挫
src/longest_palindromic_substring.rs:3
Method
find
(trie: &([Option<Box<Trie>>; 26], bool), word: &str)
src/add_and_search_word_data_structure_design.rs:40
Method
find_kth_largest_pq
(nums: Vec<i32>, k: i32)
src/kth_largest_element_in_an_array.rs:7
Method
find_kth_largest_sort
(mut nums: Vec<i32>, k: i32)
src/kth_largest_element_in_an_array.rs:2
Method
generate
(num_rows: i32)
src/pascals_triangle.rs:2
Method
generate_parenthesis
(n: i32)
src/generate_parentheses.rs:2
Method
generate_parenthesis_cn
和这个大佬说的dp很像 https://leetcode.com/problems/generate-parentheses/discuss/209410/c%2B%2B-dynamic-programming-(0ms) 设 a[n] = generate_parenthesis(n) a[0]
src/generate_parentheses.rs:27
Method
get_min
(&self)
src/min_stack.rs:54
Method
group_anagrams
(strs: Vec<String>)
src/group_anagrams.rs:4
Method
int_to_roman
用了迭代器也好慢啊, 16ms 难道是 String 的处理太慢了?
src/integer_to_roman.rs:4
Method
is_isomorphic
(s: String, t: String)
src/isomorphic_strings.rs:2
Method
is_match
使用泛型以同时接受 String, &str. 测试的时候可以少写一点代码! Yu 的神奇算法, 抓住了 '*' 再多都只需要考虑一个这一点 http://yucoding.blogspot.com/2013/02/leetcode-question-123-wildcard-matching.ht
src/wildcard_matching.rs:5
Method
is_mirror
(t1: Option<Rc<RefCell<TreeNode>>>, t2: Option<Rc<RefCell<TreeNode>>>)
src/symmetric_tree.rs:10
Method
is_palindrome
(s: String)
src/valid_palindrome.rs:2
Method
is_palindrome
(x: i32)
src/palindrome_number.rs:2
Method
is_power_of_two
(n: i32)
src/power_of_two.rs:2
Method
is_same_tree
Best Practice !
src/same_tree.rs:7
Method
is_same_tree2
(p: Option<Rc<RefCell<TreeNode>>>, q: Option<Rc<RefCell<TreeNode>>>)
src/same_tree.rs:15
Method
is_symmetric
(root: Option<Rc<RefCell<TreeNode>>>)
src/symmetric_tree.rs:6
Method
is_symmetric_iter
(root: Option<Rc<RefCell<TreeNode>>>)
src/symmetric_tree.rs:22
Method
is_ugly
(mut num: i32)
src/ugly_number.rs:2
Method
is_valid
(s: String)
src/valid_parentheses.rs:2
Method
is_valid_sudoku
朴实蠢蠢的方法
src/valid_sudoku.rs:3
Method
is_valid_sudoku_hashset
妙啊妙啊 https://leetcode.com/problems/valid-sudoku/discuss/15472/Short%2BSimple-Java-using-Strings 对于 i 行 j 列的数字 c, 将 (None, c, j) (i, c, None) (i / 3, c
src/valid_sudoku.rs:46
Function
iter
()
src/symmetric_tree.rs:63
Method
largest_number
(nums: Vec<i32>)
src/largest_number.rs:18
Method
length_of_last_word
(s: String)
src/length_of_last_word.rs:2
Method
length_of_last_word_builtin
(s: String)
src/length_of_last_word.rs:6
Method
length_of_longest_substring
(s: String)
src/longest_substring_without_repeating_characters.rs:4
next →
1–100 of 279, ranked by callers