8000 Merge pull request #27 from songyzh/discuss-link · Signis-bin/leetcode-rust@33b135d · GitHub
[go: up one dir, main page]

Skip to content

Commit 33b135d

Browse files
authored
Merge pull request aylei#27 from songyzh/discuss-link
add problem and discuss link to existing solutions
2 parents 5152b8e + 5552d15 commit 33b135d

File tree

238 files changed

+925
-208
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

238 files changed

+925
-208
lines changed

src/solution/mod.rs

Lines changed: 208 additions & 208 deletions
Large diffs are not rendered by default.

src/solution/s0001_two_sum.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
*/
1919
pub struct Solution {}
2020

21+
// problem: https://leetcode.com/problems/two-sum/
22+
// discuss: https://leetcode.com/problems/two-sum/discuss/?currentPage=1&orderBy=most_votes&query=
23+
2124
// submission codes start here
2225

2326
use std::collections::HashMap;

src/solution/s0002_add_two_numbers.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
pub struct Solution {}
2020
use crate::util::linked_list::{to_list, ListNode};
2121

22+
// problem: https://leetcode.com/problems/add-two-numbers/
23+
// discuss: https://leetcode.com/problems/add-two-numbers/discuss/?currentPage=1&orderBy=most_votes&query=
24+
2225
// submission codes start here
2326

2427
impl Solution {

src/solution/s0003_longest_substring.rs renamed to src/solution/s0003_longest_substring_without_repeating_characters.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
*/
1313
pub struct Solution {}
1414

15+
// problem: https://leetcode.com/problems/longest-substring-without-repeating-characters/
16+
// discuss: https://leetcode.com/problems/longest-substring-without-repeating-characters/discuss/?currentPage=1&orderBy=most_votes&query=
17+
1518
// submission codes start here
1619

1720
impl Solution {

src/solution/s0004_median_of_two_sorted_arrays.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
*/
2929
pub struct Solution {}
3030

31+
// problem: https://leetcode.com/problems/median-of-two-sorted-arrays/
32+
// discuss: https://leetcode.com/problems/median-of-two-sorted-arrays/discuss/?currentPage=1&orderBy=most_votes&query=
33+
3134
// submission codes start here
3235

3336
// TODO: nth slice

src/solution/s0005_longest_palindromic_substring.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
*/
2222
pub struct Solution {}
2323

24+
// problem: https://leetcode.com/problems/longest-palindromic-substring/
25+
// discuss: https://leetcode.com/problems/longest-palindromic-substring/discuss/?currentPage=1&orderBy=most_votes&query=
26+
2427
// submission codes start here
2528

2629
impl Solution {

src/solution/s0006_zigzag_conversion.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
*/
3939
pub struct Solution {}
4040

41+
// problem: https://leetcode.com/problems/zigzag-conversion/
42+
// discuss: https://leetcode.com/problems/zigzag-conversion/discuss/?currentPage=1&orderBy=most_votes&query=
43+
4144
// submission codes start here
4245

4346
impl Solution {

src/solution/s0007_reverse_integer.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
*/
3131
pub struct Solution {}
3232

33+
// problem: https://leetcode.com/problems/reverse-integer/
34+
// discuss: https://leetcode.com/problems/reverse-integer/discuss/?currentPage=1&orderBy=most_votes&query=
35+
3336
// submission codes start here
3437
impl Solution {
3538
pub fn reverse(x: i32) -> i32 {

src/solution/s0008_string_to_integer_atoi.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@
6161
*/
6262
pub struct Solution {}
6363

64+
// problem: https://leetcode.com/problems/string-to-integer-atoi/
65+
// discuss: https://leetcode.com/problems/string-to-integer-atoi/discuss/?currentPage=1&orderBy=most_votes&query=
66+
6467
// submission codes start here
6568

6669
impl Solution {

src/solution/s0009_palindrome_number.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
*/
3434
pub struct Solution {}
3535

36+
// problem: https://leetcode.com/problems/palindrome-number/
37+
// discuss: https://leetcode.com/problems/palindrome-number/discuss/?currentPage=1&orderBy=most_votes&query=
38+
3639
// submission codes start here
3740

3841
// TODO: not optimal, we only have to revert half of the string

0 commit comments

Comments
 (0)
0