From 554d66f6a3157d4e427aef410741365d46b37130 Mon Sep 17 00:00:00 2001 From: HAOYUatHZ Date: Fri, 19 Jul 2019 20:14:52 +0800 Subject: [PATCH 01/82] init single-number-iii --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 452182b..9a39431 100644 --- a/README.md +++ b/README.md @@ -54,10 +54,10 @@ cargo test 0191 |[Number of 1 Bits](https://leetcode.com/problems/number-of-1-bits/) | [C++](https://github.com/kamyu104/LeetCode-Solutions/blob/master/C++/number-of-1-bits.cpp), [Python](https://github.com/kamyu104/LeetCode-Solutions/blob/master/Python/number-of-1-bits.py)
[Rust](./kamyu104/src/number_of_1_bits.rs) | _O(1)_ | _O(1)_ | Easy ||| 0201 | [Bitwise AND of Numbers Range](https://leetcode.com/problems/bitwise-and-of-numbers-range/) | [C++](https://github.com/kamyu104/LeetCode-Solutions/blob/master/C++/bitwise-and-of-numbers-range.cpp), [Python](https://github.com/kamyu104/LeetCode-Solutions/blob/master/Python/bitwise-and-of-numbers-range.py)
[Rust](./kamyu104/src/bitwise_and_of_numbers_range.rs) | _O(1)_ | _O(1)_ | Medium || 0231 | [Power of Two](https://leetcode.com/problems/power-of-two/) | [C++](https://github.com/kamyu104/LeetCode-Solutions/blob/master/C++/power-of-two.cpp), [Python](https://github.com/kamyu104/LeetCode-Solutions/blob/master/Python/power-of-two.py)
[Rust](./kamyu104/src/power_of_two.rs) | _O(1)_ | _O(1)_ | Easy | LintCode | +0260 | [Single Number III](https://leetcode.com/problems/single-number-iii/) | [C++](https://github.com/kamyu104/LeetCode-Solutions/blob/master/C++/single-number-iii.cpp), [Python](https://github.com/kamyu104/LeetCode-Solutions/blob/master/Python/single-number-iii.py)
[Rust](./kamyu104/src/single_number_iii.rs) | _O(n)_ | _O(1)_ | Medium || - - -## Acknowledgements - -+ https://github.com/kamyu104/LeetCode-Solutions -+ https://github.com/begeekmyfriend/leetcode diff --git a/kamyu104/src/maximum_product_of_word_lengths.rs b/kamyu104/src/maximum_product_of_word_lengths.rs index ef557d9..bf87cf3 100644 --- a/kamyu104/src/maximum_product_of_word_lengths.rs +++ b/kamyu104/src/maximum_product_of_word_lengths.rs @@ -2,12 +2,12 @@ // Space: O(n) // Counting Sort + Pruning + Bit Manipulation // https://github.com/kamyu104/LeetCode-Solutions/blob/master/C++/maximum-product-of-word-lengths.cpp#L1-L40 -pub struct Solution1 {} -impl Solution1 { - pub fn max_product(words: Vec) -> i32 { - 0 - } -} +// pub struct Solution1 {} +// impl Solution1 { +// pub fn max_product(words: Vec) -> i32 { +// 0 +// } +// } // Time: O(nlogn) ~ O(n^2) // Space: O(n) @@ -45,23 +45,23 @@ impl Solution2 { // # Time: O(n) ~ O(n^2) // # Space: O(n) // https://github.com/kamyu104/LeetCode-Solutions/blob/master/Python/maximum-product-of-word-lengths.py#L1-L36 -pub struct Solution3 {} -impl Solution3 { - pub fn max_product(words: Vec) -> i32 { - 0 - } -} +// pub struct Solution3 {} +// impl Solution3 { +// pub fn max_product(words: Vec) -> i32 { +// 0 +// } +// } // # Time: O(nlogn) ~ O(n^2) // # Space: O(n) // # Sorting + Pruning + Bit Manipulation // https://github.com/kamyu104/LeetCode-Solutions/blob/master/Python/maximum-product-of-word-lengths.py#L38-L62 -pub struct Solution4 {} -impl Solution4 { - pub fn max_product(words: Vec) -> i32 { - 0 - } -} +// pub struct Solution4 {} +// impl Solution4 { +// pub fn max_product(words: Vec) -> i32 { +// 0 +// } +// } #[cfg(test)] mod tests { From 96ed4a446a3d8274b74f68dec402dc1772dd55de Mon Sep 17 00:00:00 2001 From: HAOYUatHZ Date: Wed, 24 Jul 2019 10:12:55 +0800 Subject: [PATCH 40/82] init for power_of_four --- README.md | 2 +- kamyu104/src/main.rs | 1 + kamyu104/src/maximum_product_of_word_lengths.rs | 3 +-- kamyu104/src/power_of_four.rs | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 kamyu104/src/power_of_four.rs diff --git a/README.md b/README.md index a7a34d6..5dfeb29 100644 --- a/README.md +++ b/README.md @@ -64,10 +64,10 @@ cargo test 0260 | [Single Number III](https://leetcode.com/problems/single-number-iii/) | [C++](https://github.com/kamyu104/LeetCode-Solutions/blob/master/C++/single-number-iii.cpp) [Python](https://github.com/kamyu104/LeetCode-Solutions/blob/master/Python/single-number-iii.py)
------
[Rust](./kamyu104/src/single_number_iii.rs) | _O(n)_ | _O(1)_ | Medium || 0268| [Missing Number](https://leetcode.com/problems/missing-number/) | [C++](https://github.com/kamyu104/LeetCode-Solutions/blob/master/C++/missing-number.cpp) [Python](https://github.com/kamyu104/LeetCode-Solutions/blob/master/Python/missing-number.py)
------
[Rust](./kamyu104/src/missing_number.rs) | _O(n)_ | _O(1)_ | Medium | LintCode || 0318| [Maximum Product of Word Lengths](https://leetcode.com/problems/maximum-product-of-word-lengths/) | [C++](https://github.com/kamyu104/LeetCode-Solutions/blob/master/C++/maximum-product-of-word-lengths.cpp) [Python](https://github.com/kamyu104/LeetCode-Solutions/blob/master/Python/maximum-product-of-word-lengths.py)
------
[Rust](./kamyu104/src/maximum_product_of_word_lengths.rs) | _O(n)_ ~ _O(n^2)_ | _O(n)_ | Medium || Bit Manipulation, Counting Sort, Pruning| +0342 | [Power of Four](https://leetcode.com/problems/power-of-four/) | [C++](https://github.com/kamyu104/LeetCode-Solutions/blob/master/C++/power-of-four.cpp) [Python](https://github.com/kamyu104/LeetCode-Solutions/blob/master/Python/power-of-four.py)
------
[Rust](./kamyu104/src/power_of_four.rs) | _O(1)_ | _O(1)_ | Easy | |

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy