MCPcopy Create free account

hub / github.com/StudyRust/leetcode_rust / functions

Functions742 in github.com/StudyRust/leetcode_rust

↓ 201 callersMethodpush
(&mut self, val: i32)
155-min-stack.rs:13
↓ 40 callersMethodinsert
(&mut self, key: String, val: i32)
677-map-sum-pairs.rs:20
↓ 30 callersMethodget
Returns the value to which the specified key is mapped, or -1 if this map contains no mapping for the key */
706-design-hashmap.rs:25
↓ 21 callersMethodcontains
(&self, key: i32)
705-design-hashset.rs:25
↓ 19 callersMethodremove
Removes the mapping of the specified value key if this map contains a mapping for the key */
706-design-hashmap.rs:34
↓ 12 callersMethodpop
(&mut self)
155-min-stack.rs:17
↓ 9 callersMethodsum
(&mut self, prefix: String)
677-map-sum-pairs.rs:28
↓ 5 callersMethodpop
(&mut self)
1381-design-a-stack-with-increment-operation.rs:19
↓ 5 callersMethodpush
(&mut self, x: i32)
1381-design-a-stack-with-increment-operation.rs:15
↓ 4 callersMethodvisit
(&mut self, url: String)
1472-design-browser-history.rs:15
↓ 3 callersMethodadd_back
(&mut self, num: i32)
2336-smallest-number-in-infinite-set.rs:30
↓ 3 callersMethodpush
(&mut self, x: i32)
225-implement-stack-using-queues.rs:12
↓ 3 callersFunctionstr_number
(s: String)
1880-check-if-word-equals-summation-of-two-words.rs:16
↓ 2 callersFunctionassemble
(current: Vec<i32>)
228-summary-ranges.rs:6
↓ 2 callersFunctioncount_meta
(chars: Vec<char>)
1704-determine-if-string-halves-are-alike.rs:12
↓ 2 callersFunctionget_chars
(s: String)
844-backspace-string-compare.rs:2
↓ 2 callersFunctionget_word_map
(words: Vec<String>)
2085-count-common-words-with-one-occurrence.rs:3
↓ 2 callersMethodincrement
(&mut self, k: i32, val: i32)
1381-design-a-stack-with-increment-operation.rs:25
↓ 2 callersFunctionis_contain_zero
(n: i32)
1317-convert-integer-to-the-sum-of-two-no-zero-integers.rs:2
↓ 2 callersFunctionmove_zeroes
跟紧接着不为0的数字互换
283-move-zeroes.rs:2
↓ 2 callersMethodpush
(&mut self, x: i32)
232-implement-queue-using-stacks.rs:13
↓ 2 callersMethodreset
(&self)
384-shuffle-an-array.rs:9
↓ 2 callersFunctionstring_to_value
(s: String)
1170-compare-strings-by-frequency-of-the-smallest-character.rs:2
↓ 2 callersFunctiontime_to_mins
(time: String)
2224-minimum-number-of-operations-to-convert-time.rs:2
↓ 1 callersMethodadd
(&mut self, key: i32)
705-design-hashset.rs:17
↓ 1 callersFunctionarray_sign
思路 遍历,如果出现0 返回0,出现正数不变,负数乘以 -1
1822-sign-of-the-product-of-an-array.rs:17
↓ 1 callersFunctionbalanced_string_split
(s: String)
1221-split-a-string-in-balanced-strings.rs:21
↓ 1 callersFunctionbuild_array
(nums: Vec<i32>)
1920-build-array-from-permutation.rs:14
↓ 1 callersMethodbuild_dict
(&mut self, dictionary: Vec<String>)
676-implement-magic-dictionary.rs:14
↓ 1 callersFunctioncal
(q: i32, sorted_nums: &[i32])
2389-longest-subsequence-with-limited-sum.rs:2
↓ 1 callersFunctioncheck_if_pangram
(sentence: String)
1832-check-if-the-sentence-is-pangram.rs:17
↓ 1 callersFunctioncount_k_difference
(nums: Vec<i32>, k: i32)
2006-count-number-of-pairs-with-absolute-difference-k.rs:19
↓ 1 callersFunctioncount_matches
(items: Vec<Vec<String>>, rule_key: String, rule_value: String)
1773-count-items-matching-a-rule.rs:20
↓ 1 callersMethoddeposit
(&mut self, account: i32, money: i64)
2043-simple-bank-system.rs:32
↓ 1 callersFunctiondfs
(mmp: &mut HashSet<i32>, rooms: &Vec<Vec<i32>>, key: i32)
841-keys-and-rooms.rs:4
↓ 1 callersFunctiondiagonal_sum
(mat: Vec<Vec<i32>>)
1572-matrix-diagonal-sum.rs:33
↓ 1 callersFunctionduplicate_zeros
(arr: &mut Vec<i32>)
1089-duplicate-zeros.rs:4
↓ 1 callersMethodempty
(&self)
225-implement-stack-using-queues.rs:27
↓ 1 callersMethodempty
(&self)
232-implement-queue-using-stacks.rs:27
↓ 1 callersFunctionfinal_value_after_operations
(operations: Vec<String>)
2011-final-value-of-variable-after-performing-operations.rs:19
↓ 1 callersFunctionfind_gcd
(nums: Vec<i32>)
1979-find-greatest-common-divisor-of-array.rs:20
↓ 1 callersFunctionflip_and_invert_image
(image: Vec<Vec<i32>>)
832-flipping-an-image.rs:22
↓ 1 callersFunctionget_concatenation
1929 https://leetcode-cn.com/problems/concatenation-of-array/ [1,2,1] [1,2,1,1,2,1] 审题,函数输入已经固定是 immut vec,那么结果不能用他返回 所以需要declare 2 个mut 的nums
1929-concatenation-of-array.rs:11
↓ 1 callersFunctionhave_broken_letters
(word: String, broken_letters: &str)
1935-maximum-number-of-words-you-can-type.rs:4
↓ 1 callersFunctioninterpret
100% 100% haha
1678-goal-parser-interpretation.rs:22
↓ 1 callersFunctionis_arithmetic
(nums: &[i32])
413-arithmetic-slices.rs:3
↓ 1 callersFunctionis_good
(e: i32)
788-rotated-digits.rs:2
↓ 1 callersFunctionis_good
(s: &str)
2264-largest-3-same-digit-number-in-string.rs:2
↓ 1 callersFunctionis_nice
(s: &str)
1763-longest-nice-substring.rs:2
↓ 1 callersFunctionis_nice_str
(s: &str)
1763-ongest-nice-substring.rs:3
↓ 1 callersFunctionis_odd
(num: i32)
1550-three-consecutive-odds.rs:2
↓ 1 callersFunctionis_palindrome
(word: &String)
2108-find-first-palindromic-string-in-the-array.rs:2
↓ 1 callersFunctionis_palindromic
(cs: &[char])
647-palindromic-substrings.rs:2
↓ 1 callersFunctionis_prime
(num: usize)
762-prime-number-of-set-bits-in-binary-representation.rs:2
↓ 1 callersFunctionis_run_year
(year: String)
1154-day-of-the-year.rs:12
↓ 1 callersFunctionkids_with_candies
(candies: Vec<i32>, extra_candies: i32)
1431-kids-with-the-greatest-number-of-candies.rs:21
↓ 1 callersFunctionluck
(s: String)
1945-sum-of-digits-of-string-after-convert.rs:2
↓ 1 callersFunctionmake_fancy_string
1957 https://leetcode-cn.com/problems/delete-characters-to-make-fancy-string/ leeetcode leetcode aaabaaaa aabaa aab aab
1957-make_fancy_string.rs:11
↓ 1 callersFunctionmax_product_difference
(nums: Vec<i32>)
1913-maximum-product-difference-between-two-pairs.rs:18
↓ 1 callersFunctionmaximum_wealth
来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/richest-customer-wealth 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
1672-richest-customer-wealth.rs:17
↓ 1 callersFunctionmin_count
(coins: Vec<i32>)
lcp06-na-ying-bi.rs:19
↓ 1 callersFunctionmin_time_to_type
1974 https://leetcode-cn.com/problems/minimum-time-to-type-word-using-special-typewriter/ word = "abc" 5 word = "bza" 7 word = "zjpc" 34
1974_minimum-time-to-type-word-using-special-typewriter.rs:11
↓ 1 callersFunctionnum_identical_pairs
(nums: Vec<i32>)
1512-number-of-good-pairs.rs:19
↓ 1 callersFunctionok
(a: &String, b: &String)
318-maximum-product-of-word-lengths.rs:4
↓ 1 callersMethodpeek
(&self)
232-implement-queue-using-stacks.rs:23
↓ 1 callersMethodpop
(&mut self)
225-implement-stack-using-queues.rs:16
↓ 1 callersMethodpop
(&mut self)
232-implement-queue-using-stacks.rs:17
↓ 1 callersFunctionpowerset
(s: Vec<i32>)
1863-sum-of-all-subset-xor-totals.rs:26
↓ 1 callersMethodput
value will always be non-negative. */
706-design-hashmap.rs:20
↓ 1 callersMethodremove
(&mut self, key: i32)
705-design-hashset.rs:21
↓ 1 callersMethodsearch
(&self, search_word: String)
676-implement-magic-dictionary.rs:20
↓ 1 callersFunctionshuffle
(nums: Vec<i32>, n: i32)
1470-shuffle-the-array.rs:17
↓ 1 callersMethodshuffle
(&self)
384-shuffle-an-array.rs:12
↓ 1 callersFunctionsort_colors
(nums: &mut Vec<i32>)
75-sort-colors.rs:1
↓ 1 callersFunctionsubset_xor_sum
(nums: Vec<i32>)
1863-sum-of-all-subset-xor-totals.rs:43
↓ 1 callersFunctiontitle_to_number
171 https://leetcode-cn.com/problems/excel-sheet-column-number/submissions/ "FXSHRXW" 2147483647
171_title_to_number.rs:9
↓ 1 callersMethodtop
(&self)
225-implement-stack-using-queues.rs:23
↓ 1 callersMethodtransfer
(&mut self, account1: i32, account2: i32, money: i64)
2043-simple-bank-system.rs:17
↓ 1 callersMethodwithdraw
(&mut self, account: i32, money: i64)
2043-simple-bank-system.rs:40
Methodadd_car
(&mut self, car_type: i32)
1603-design-parking-system.rs:14
Functionadd_digits
(num: i32)
258-add-digits.rs:1
Methodadd_num
(&mut self, val: i32)
352-data-stream-as-disjoint-intervals.rs:14
Functionadd_spaces
(s: String, spaces: Vec<i32>)
2109-adding-spaces-to-a-string.rs:1
Functionanswer_queries
(nums: Vec<i32>, queries: Vec<i32>)
2389-longest-subsequence-with-limited-sum.rs:1
Functionapply_operations
(nums: Vec<i32>)
2460-apply-operations-to-an-array.rs:1
Functionare_almost_equal
(s1: String, s2: String)
1790-check-if-one-string-swap-can-make-strings-equal.rs:1
Functionare_numbers_ascending
(s: String)
2042-check-if-numbers-are-ascending-in-a-sentence.rs:1
Functionare_occurrences_equal
(s: String)
1941-check-if-all-characters-have-equal-number-of-occurrences.rs:12
Functionarray_pair_sum
(nums: Vec<i32>)
561-array-partition-i.rs:1
Functionarray_rank_transform
(arr: Vec<i32>)
1331-rank-transform-of-an-array.rs:1
Functionarray_strings_are_equal
(word1: Vec<String>, word2: Vec<String>)
1662-check-if-two-string-arrays-are-equivalent.rs:7
Functionaverage
(salary: Vec<i32>)
1491-average-salary-excluding-the-minimum-and-maximum-salary.rs:1
Functionaverage_value
(nums: Vec<i32>)
2455-average-value-of-even-numbers-that-are-divisible-by-three.rs:1
Functionaverage_waiting_time
(customers: Vec<Vec<i32>>)
1701-average-waiting-time.rs:1
Methodback
(&mut self, steps: i32)
1472-design-browser-history.rs:21
Functionbackspace_compare
(s: String, t: String)
844-backspace-string-compare.rs:1
Methodbacktrace
(n: i32, k: usize, start_index: i32, path: &mut Vec<i32>, ret: &mut Vec<Vec<i32>>, sum: i32)
216-combination-sum-iii.rs:5
Methodbacktrace
(n: i32, k: usize, start_index: i32, path: &mut Vec<i32>, ret: &mut Vec<Vec<i32>>)
77-combinations.rs:5
Methodbacktrack
(path: &mut Vec<i32>, ans: &mut Vec<Vec<i32>>, begin: usize)
46-permutations.rs:22
Functionbinary_gap
(n: i32)
868-binary-gap.rs:1
next →1–100 of 742, ranked by callers