MCPcopy Create free account

hub / github.com/aylei/leetcode-rust / functions

Functions608 in github.com/aylei/leetcode-rust

Methoddfs
( curr: usize, mut path: Vec<String>, words: &Vec<String>, paths: &Vec<(i3
src/solution/s0126_word_ladder_ii.rs:127
Methoddfs
(i: usize, j: usize, height: usize, width: usize, board: &mut Vec<Vec<char>>)
src/solution/s0130_surrounded_regions.rs:65
Methoddiff_ways_to_compute
(input: String)
src/solution/s0241_different_ways_to_add_parentheses.rs:36
Methoddivide
(dividend: i32, divisor: i32)
src/solution/s0029_divide_two_integers.rs:39
Methodempty
Returns whether the stack is empty. */
src/solution/s0225_implement_stack_using_queues.rs:93
Methodempty
Returns whether the queue is empty. */
src/solution/s0232_implement_queue_using_stacks.rs:80
Methodeq
(&self, other: &Self)
src/solution/s0023_merge_k_sorted_lists.rs:39
Methodeval_rpn
(tokens: Vec<String>)
src/solution/s0150_evaluate_reverse_polish_notation.rs:55
Methodexist
(board: Vec<Vec<char>>, word: String)
src/solution/s0079_word_search.rs:33
Methodfib
(n: i32)
src/solution/s0509_fibonacci_number.rs:54
Methodfind_duplicate
(nums: Vec<i32>)
src/solution/s0287_find_the_duplicate_number.rs:43
Methodfind_k
(a: &Vec<i32>, k: i32)
src/solution/s0969_pancake_sorting.rs:78
Methodfind_kth_largest
(nums: Vec<i32>, k: i32)
src/solution/s0215_kth_largest_element_in_an_array.rs:33
Methodfind_ladders
( begin_word: String, end_word: String, word_list: Vec<String>, )
src/solution/s0126_word_ladder_ii.rs:73
Methodfind_median
(&self)
src/solution/s0295_find_median_from_data_stream.rs:103
Methodfind_median_sorted_arrays
(nums1: Vec<i32>, nums2: Vec<i32>)
src/solution/s0004_median_of_two_sorted_arrays.rs:38
Methodfind_min
(nums: Vec<i32>)
src/solution/s0153_find_minimum_in_rotated_sorted_array.rs:35
Methodfind_min
(nums: Vec<i32>)
src/solution/s0154_find_minimum_in_rotated_sorted_array_ii.rs:49
Methodfind_min_height_trees
(n: i32, edges: Vec<Vec<i32>>)
src/solution/s0310_minimum_height_trees.rs:57
Methodfind_order
(num_courses: i32, prerequisites: Vec<Vec<i32>>)
src/solution/s0210_course_schedule_ii.rs:46
Methodfind_peak_element
(nums: Vec<i32>)
src/solution/s0162_find_peak_element.rs:41
Methodfind_repeated_dna_sequences
(s: String)
src/solution/s0187_repeated_dna_sequences.rs:35
Methodfind_substring
(s: String, words: Vec<String>)
src/solution/s0030_substring_with_concatenation_of_all_words.rs:62
Methodfind_words
(board: Vec<Vec<char>>, words: Vec<String>)
src/solution/s0212_word_search_ii.rs:44
Methodfirst_missing_positive
(nums: Vec<i32>)
src/solution/s0041_first_missing_positive.rs:40
Methodflatten
(root: &mut Option<Rc<RefCell<TreeNode>>>)
src/solution/s0114_flatten_binary_tree_to_linked_list.rs:44
Methodflatten_helper
(root: Option<Rc<RefCell<TreeNode>>>)
src/solution/s0114_flatten_binary_tree_to_linked_list.rs:48
Methodfmt
(&self, f: &mut Formatter)
src/fetcher.rs:209
Methodfour_sum
(nums: Vec<i32>, target: i32)
src/solution/s0018_4sum.rs:37
Methodfraction_to_decimal
(numerator: i32, denominator: i32)
src/solution/s0166_fraction_to_recurring_decimal.rs:38
Methodfull_justify
(words: Vec<String>, max_width: i32)
src/solution/s0068_text_justification.rs:78
Methodgame_of_life
(board: &mut Vec<Vec<i32>>)
src/solution/s0289_game_of_life.rs:53
Methodgenerate
(num_rows: i32)
src/solution/s0118_pascals_triangle.rs:32
Methodgenerate_matrix
(n: i32)
src/solution/s0059_spiral_matrix_ii.rs:27
Methodgenerate_parenthesis
(n: i32)
src/solution/s0022_generate_parentheses.rs:30
Methodgenerate_trees
(n: i32)
src/solution/s0095_unique_binary_search_trees_ii.rs:58
Methodget_hint
(secret: String, guess: String)
src/solution/s0299_bulls_and_cows.rs:38
Methodget_min
(&self)
src/solution/s0155_min_stack.rs:85
Methodget_parent
(parent: &mut Vec<Vec<(usize, usize)>>, p: (usize, usize))
src/solution/s0200_number_of_islands.rs:70
Methodget_permutation
(n: i32, k: i32)
src/solution/s0060_permutation_sequence.rs:51
Methodget_row
(row_index: i32)
src/solution/s0119_pascals_triangle_ii.rs:39
Methodget_skyline
(buildings: Vec<Vec<i32>>)
src/solution/s0218_the_skyline_problem.rs:33
Methodgray_code
(n: i32)
src/solution/s0089_gray_code.rs:58
Methodgroup_anagrams
(strs: Vec<String>)
src/solution/s0049_group_anagrams.rs:34
Methodh_index
(mut citations: Vec<i32>)
src/solution/s0274_h_index.rs:29
Methodh_index
(citations: Vec<i32>)
src/solution/s0275_h_index_ii.rs:38
Methodhas_next
@return whether we have a next smallest number */
src/solution/s0173_binary_search_tree_iterator.rs:85
Methodhas_path_sum
(root: Option<Rc<RefCell<TreeNode>>>, sum: i32)
src/solution/s0112_path_sum.rs:37
Methodhelper
( chs: &Vec<char>, idx: usize, left: i32, l_remain: i32, r_remain: i32
src/solution/s0301_remove_invalid_parentheses.rs:62
Methodhelper
(root: Option<Rc<RefCell<TreeNode>>>, path: String, res: &mut Vec<String>)
src/solution/s0257_binary_tree_paths.rs:59
Methodhelper
(distance: i32, prev: i32, remain: i32, mut curr: Vec<i32>, res: &mut Vec<Vec<i32>>)
src/solution/s0216_combination_sum_iii.rs:52
Methodhelper
(root: Option<Rc<RefCell<TreeNode>>>, k: i32, res: &mut i32)
src/solution/s0230_kth_smallest_element_in_a_bst.rs:55
Methodhelper
(input: &str)
src/solution/s0241_different_ways_to_add_parentheses.rs:40
Methodhelper
(root: Option<Rc<RefCell<TreeNode>>>, vec: &mut Vec<i32>)
src/solution/s0144_binary_tree_preorder_traversal.rs:39
Methodhelper
(root: Option<Rc<RefCell<TreeNode>>>, vec: &mut Vec<i32>)
src/solution/s0145_binary_tree_postorder_traversal.rs:39
Methodhit
(s: String)
src/solution/s0242_valid_anagram.rs:39
Methodinorder_traversal
(root: Option<Rc<RefCell<TreeNode>>>)
src/solution/s0094_binary_tree_inorder_traversal.rs:32
Methodinorder_traverse
(root: Option<&Rc<RefCell<TreeNode>>>, consumer: &mut F)
src/solution/s0094_binary_tree_inorder_traversal.rs:38
Methodinsertion_sort_list
(head: Option<Box<ListNode>>)
src/solution/s0147_insertion_sort_list.rs:51
Methodint_to_roman
(num: i32)
src/solution/s0012_integer_to_roman.rs:70
Methodinvert_tree
(root: Option<Rc<RefCell<TreeNode>>>)
src/solution/s0226_invert_binary_tree.rs:43
Methodis_additive_number
(num: String)
src/solution/s0306_additive_number.rs:43
Methodis_anagram
(s: String, t: String)
src/solution/s0242_valid_anagram.rs:35
Methodis_balanced
(root: Option<Rc<RefCell<TreeNode>>>)
src/solution/s0110_balanced_binary_tree.rs:53
Methodis_happy
(n: i32)
src/solution/s0202_happy_number.rs:29
Methodis_interleave
(s1: String, s2: String, s3: String)
src/solution/s0097_interleaving_string.rs:43
Methodis_isomorphic
(s: String, t: String)
src/solution/s0205_isomorphic_strings.rs:44
Methodis_match
(s: String, p: String)
src/solution/s0010_regular_expression_matching.rs:79
Methodis_number
(s: String)
src/solution/s0065_valid_number.rs:47
Methodis_palindrome
( cache: &mut Vec<Vec<Option<bool>>>, s: &Vec<char>, i: usize, j: usize, )
src/solution/s0131_palindrome_partitioning.rs:78
Methodis_palindrome
( cache: &mut Vec<Vec<Option<bool>>>, s: &Vec<char>, i: usize, j: usize, )
src/solution/s0132_palindrome_partitioning_ii.rs:59
Methodis_palindrome
(s: String)
src/solution/s0125_valid_palindrome.rs:31
Methodis_palindrome
(x: i32)
src/solution/s0009_palindrome_number.rs:43
Methodis_power_of_two
(n: i32)
src/solution/s0231_power_of_two.rs:36
Methodis_same_tree
( p: Option<Rc<RefCell<TreeNode>>>, q: Option<Rc<RefCell<TreeNode>>>, )
src/solution/s0100_same_tree.rs:55
Methodis_scramble
(s1: String, s2: String)
src/solution/s0087_scramble_string.rs:72
Methodis_symmetric
(root: Option<Rc<RefCell<TreeNode>>>)
src/solution/s0101_symmetric_tree.rs:43
Methodis_ugly
(num: i32)
src/solution/s0263_ugly_number.rs:46
Methodis_valid
(s: String)
src/solution/s0020_valid_parentheses.rs:59
Methodis_valid_bst
(root: Option<Rc<RefCell<TreeNode>>>)
src/solution/s0098_validate_binary_search_tree.rs:51
Methodis_valid_sudoku
(board: Vec<Vec<char>>)
src/solution/s0036_valid_sudoku.rs:74
Methodjump
(nums: Vec<i32>)
src/solution/s0045_jump_game_ii.rs:32
Methodkth_smallest
(root: Option<Rc<RefCell<TreeNode>>>, k: i32)
src/solution/s0230_kth_smallest_element_in_a_bst.rs:49
Methodladder_length
(begin_word: String, end_word: String, word_list: Vec<String>)
src/solution/s0127_word_ladder.rs:58
Methodlargest_number
(nums: Vec<i32>)
src/solution/s0179_largest_number.rs:30
Methodlargest_rectangle_area
(heights: Vec<i32>)
src/solution/s0084_largest_rectangle_in_histogram.rs:35
Methodlast_stone_weight
(stones: Vec<i32>)
src/solution/s1046_last_stone_weight.rs:46
Methodlength_of_last_word
(s: String)
src/solution/s0058_length_of_last_word.rs:25
Methodlength_of_lis
(nums: Vec<i32>)
src/solution/s0300_longest_increasing_subsequence.rs:32
Methodlength_of_longest_substring
(s: String)
src/solution/s0003_longest_substring_without_repeating_characters.rs:21
Methodletter_combinations
(digits: String)
src/solution/s0017_letter_combinations_of_a_phone_number.rs:30
Methodlevel_order
(root: Option<Rc<RefCell<TreeNode>>>)
src/solution/s0102_binary_tree_level_order_traversal.rs:40
Methodlevel_order_bottom
(root: Option<Rc<RefCell<TreeNode>>>)
src/solution/s0107_binary_tree_level_order_traversal_ii.rs:40
Methodlongest
(seq: &Vec<char>, plus_char: char)
src/solution/s0032_longest_valid_parentheses.rs:40
Methodlongest_common_prefix
(strs: Vec<String>)
src/solution/s0014_longest_common_prefix.rs:37
Methodlongest_consecutive
(nums: Vec<i32>)
src/solution/s0128_longest_consecutive_sequence.rs:37
Methodlongest_palindrome
(s: String)
src/solution/s0005_longest_palindromic_substring.rs:30
Methodlongest_valid_parentheses
(s: String)
src/solution/s0032_longest_valid_parentheses.rs:32
Functionmain
main() helps to generate the submission template .rs
src/main.rs:25
Methodmajority_element
(nums: Vec<i32>)
src/solution/s0229_majority_element_ii.rs:29
← previousnext →101–200 of 608, ranked by callers