8000 [pull] master from 6boris:master by pull[bot] · Pull Request #120 · hemingyuan/awesome-golang-leetcode · GitHub
[go: up one dir, main page]

Skip to content

[pull] master from 6boris:master #120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 502 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
502 commits
Select commit Hold shift + click to select a range
9d30f51
Merge pull request #741 from 0xff-dev/784
6boris Feb 11, 2024
b075186
Merge pull request #739 from 0xff-dev/2685
6boris Feb 11, 2024
36b8dc6
Merge pull request #738 from 0xff-dev/811
6boris Feb 11, 2024
c6bd74a
Merge pull request #736 from 0xff-dev/648
6boris Feb 11, 2024
eb51cfc
Merge pull request #735 from 0xff-dev/677
6boris Feb 11, 2024
7edb612
Merge pull request #734 from 0xff-dev/481
6boris Feb 11, 2024
c87074a
Merge pull request #724 from 0xff-dev/1578
6boris Feb 11, 2024
2d2af47
Merge pull request #725 from 0xff-dev/1335
6boris Feb 11, 2024
a0bb634
Merge pull request #726 from 0xff-dev/1897
6boris Feb 11, 2024
165d3b0
Merge pull request #727 from 0xff-dev/2350
6boris Feb 11, 2024
c8605a9
Merge pull request #728 from 0xff-dev/1624
6boris Feb 11, 2024
11222b2
Merge pull request #729 from 0xff-dev/2095
6boris Feb 11, 2024
7096dce
Merge pull request #730 from 0xff-dev/2058
6boris Feb 11, 2024
3748abc
Merge pull request #731 from 0xff-dev/2610
6boris Feb 11, 2024
1e51f37
Merge pull request #733 from 0xff-dev/2870
6boris Feb 11, 2024
69d7ae7
Merge pull request #732 from 0xff-dev/468
6boris Feb 11, 2024
1c762c9
update some dep
6boris Feb 11, 2024
d9d2a4a
Merge remote-tracking branch 'origin/master'
6boris Feb 11, 2024
ea2ccfe
Add solution and test-cases for problem 1079
0xff-dev Feb 12, 2024
c60f304
Add solution and test-cases for problem 1090
0xff-dev Feb 12, 2024
d9258db
Add solution and test-cases for problem 2108
0xff-dev Feb 13, 2024
588a076
Add solution and test-cases for problem 869
0xff-dev Feb 13, 2024
409735b
Add solution and test-cases for problem 945
0xff-dev Feb 14, 2024
e52473f
Add solution and test-cases for problem 2971
0xff-dev Feb 15, 2024
cdd8435
Add solution and test-cases for problem 1481
0xff-dev Feb 16, 2024
d695cb8
Add solution and test-cases for problem 1642
0xff-dev Feb 17, 2024
3920b59
Add solution and test-cases for problem 1985
0xff-dev Feb 17, 2024
e41c376
Add solution and test-cases for problem 2402
0xff-dev Feb 18, 2024
bd71d0b
Add solution and test-cases for problem 1462
0xff-dev Feb 19, 2024
e90d3e6
Add solution and test-cases for problem 636
0xff-dev Feb 20, 2024
543a565
Add solution and test-cases for problem 274
0xff-dev Feb 21, 2024
53b8b48
Add solution and test-cases for problem 786
0xff-dev Feb 22, 2024
6722b33
Add solution and test-cases for problem 2092
0xff-dev Feb 24, 2024
9adf663
Add solution and test-cases for problem 2709
0xff-dev Feb 25, 2024
db63157
Add solution and test-cases for problem 637
0xff-dev Feb 27, 2024
a98020e
Add solution and test-cases for problem 672
0xff-dev Feb 27, 2024
9eb2062
Add solution and test-cases for problem 371
0xff-dev Feb 29, 2024
abf4e97
Add solution and test-cases for problem 2864
0xff-dev Mar 1, 2024
46697e1
Add solution and test-cases for problem 2424
0xff-dev Mar 2, 2024
6a8e63b
Add solution and test-cases for problem 190
0xff-dev Mar 2, 2024
80bf806
Add solution and test-cases for problem 419
0xff-dev Mar 3, 2024
fa1085f
Add solution and test-cases for problem 638
0xff-dev Mar 3, 2024
0477350
Add solution and test-cases for problem 693
0xff-dev Mar 3, 2024
dd78d58
Add solution and test-cases for problem 948
0xff-dev Mar 4, 2024
4c47fce
Add solution and test-cases for problem 1750
0xff-dev Mar 5, 2024
893c2a1
Add solution and test-cases for problem 762
0xff-dev Mar 6, 2024
85726cd
Add solution and test-cases for problem 816
0xff-dev Mar 7, 2024
faf2f88
Add solution and test-cases for problem 2540
0xff-dev Mar 9, 2024
366ea9c
Add solution and test-cases for problem 838
0xff-dev Mar 10, 2024
b77c93d
Add solution and test-cases for problem 365
0xff-dev Mar 12, 2024
606a0a7
Add solution and test-cases for problem 173
0xff-dev Mar 14, 2024
789ac22
Add solution and test-cases for problem 227
0xff-dev Mar 15, 2024
bbd8839
Add solution and test-cases for problem 532
0xff-dev Mar 16, 2024
3428bd9
Add solution and test-cases for problem 372
0xff-dev Mar 17, 2024
bcb5c41
Add solution and test-cases for problem 1669
0xff-dev Mar 20, 2024
57b3d36
Add solution and test-cases for problem 432
0xff-dev Mar 21, 2024
5589a60
Add solution and test-cases for problem 1670
0xff-dev Mar 22, 2024
da514fe
Add solution and test-cases for problem 2296
0xff-dev Mar 23, 2024
41c3951
Merge pull request #819 from 0xff-dev/2296
6boris Mar 23, 2024
e33cec3
Merge pull request #818 from 0xff-dev/1670
6boris Mar 23, 2024
e746f64
Merge pull request #817 from 0xff-dev/432
6boris Mar 23, 2024
8ab1db4
Merge pull request #816 from 0xff-dev/1669
6boris Mar 23, 2024
4a663dc
Merge pull request #815 from 0xff-dev/372
6boris Mar 23, 2024
a0871da
Merge pull request #814 from 0xff-dev/532
6boris Mar 23, 2024
075a041
Merge pull request #813 from 0xff-dev/227
6boris Mar 23, 2024
847873c
Merge pull request #812 from 0xff-dev/173
6boris Mar 23, 2024
503659f
Merge pull request #811 from 0xff-dev/365
6boris Mar 23, 2024
079ca10
Merge pull request #810 from 0xff-dev/838
6boris Mar 23, 2024
eb1a385
Merge pull request #809 from 0xff-dev/2540
6boris Mar 23, 2024
d8d2d57
Merge pull request #808 from 0xff-dev/816
6boris Mar 23, 2024
685cf76
Merge pull request #807 from 0xff-dev/762
6boris Mar 23, 2024
9efd63b
Merge pull request #806 from 0xff-dev/1750
6boris Mar 23, 2024
f282da7
Merge pull request #805 from 0xff-dev/948
6boris Mar 23, 2024
9007bdb
Merge pull request #804 from 0xff-dev/693
6boris Mar 23, 2024
1a66d1c
Merge pull request #803 from 0xff-dev/638
6boris Mar 23, 2024
e6e14f9
Merge pull request #802 from 0xff-dev/419
6boris Mar 23, 2024
bde7d4f
Merge pull request #801 from 0xff-dev/190
6boris Mar 23, 2024
57521ed
Merge pull request #800 from 0xff-dev/2424
6boris Mar 23, 2024
ebb1baa
Merge pull request #799 from 0xff-dev/2864
6boris Mar 23, 2024
d46271d
Merge pull request #798 from 0xff-dev/371
6boris Mar 23, 2024
d32000b
Merge pull request #797 from 0xff-dev/672
6boris Mar 23, 2024
07d2a1e
Merge pull request #793 from 0xff-dev/786
6boris Mar 23, 2024
b1d3db5
Merge pull request #796 from 0xff-dev/637
6boris Mar 23, 2024
a36dc28
Merge pull request #795 from 0xff-dev/2709
6boris Mar 23, 2024
a0dda26
Merge pull request #794 from 0xff-dev/2092
6boris Mar 23, 2024
8d888d4
Merge pull request #792 from 0xff-dev/274
6boris Mar 23, 2024
c2531aa
Merge pull request #791 from 0xff-dev/636
6boris Mar 23, 2024
4d40c88
Merge pull request #786 from 0xff-dev/1481
6boris Mar 23, 2024
2f472bc
Merge pull request #787 from 0xff-dev/1642
6boris Mar 23, 2024
8ff7921
Merge pull request #790 from 0xff-dev/1462
6boris Mar 23, 2024
facbb91
Merge pull request #789 from 0xff-dev/2402
6boris Mar 23, 2024
8b0768e
Merge pull request #788 from 0xff-dev/1985
6boris Mar 23, 2024
9a12949
Merge pull request #785 from 0xff-dev/2971
6boris Mar 23, 2024
54e0718
Merge pull request #784 from 0xff-dev/945
6boris Mar 23, 2024
9d5a7d5
Merge pull request #783 from 0xff-dev/869
6boris Mar 23, 2024
1614e3f
Merge pull request #782 from 0xff-dev/2108
6boris Mar 23, 2024
9a63033
Merge pull request #781 from 0xff-dev/1090
6boris Mar 23, 2024
f648eb6
Merge pull request #780 from 0xff-dev/master
6boris Mar 23, 2024
09a1dcb
update go.mod
6boris Mar 23, 2024
be5c435
Add solution and test-cases for problem 851
0xff-dev Mar 24, 2024
2e1b3da
Add solution and test-cases for problem 795
0xff-dev Mar 25, 2024
71b908c
Add solution and test-cases for problem 41
0xff-dev Mar 26, 2024
6957c22
Add solution and test-cases for problem 713
0xff-dev Mar 27, 2024
a8279f1
Add solution and test-cases for problem 2958
0xff-dev Mar 28, 2024
a505de0
Add solution and test-cases for problem 592
0xff-dev Mar 28, 2024
8f36743
Add solution and test-cases for problem 2962
0xff-dev Mar 29, 2024
9eb815b
Add solution and test-cases for problem 992
0xff-dev Mar 30, 2024
f624d56
Add solution and test-cases for problem 99
0xff-dev Mar 31, 2024
f47bdef
Add solution and test-cases for problem 1109
0xff-dev Apr 1, 2024
13e889d
Add solution and test-cases for problem 781
0xff-dev Apr 2, 2024
d3c6503
Add solution and test-cases for problem 500
0xff-dev Apr 3, 2024
8c0e294
Add solution and test-cases for problem 1614
0xff-dev Apr 4, 2024
62e50d3
Add solution and test-cases for problem 846
0xff-dev Apr 5, 2024
0253ea2
Add solution and test-cases for problem 1296
0xff-dev Apr 5, 2024
de912f4
Add solution and test-cases for problem 1249
0xff-dev Apr 6, 2024
478e8fc
Add solution and test-cases for problem 678
0xff-dev Apr 7, 2024
5d983f3
Add solution and test-cases for problem 1700
0xff-dev Apr 8, 2024
3080df3
Add solution and test-cases for problem 289
0xff-dev Apr 8, 2024
380f62f
Add solution and test-cases for problem 2073
0xff-dev Apr 9, 2024
918f267
Add solution and test-cases for problem 950
0xff-dev Apr 10, 2024
45022a9
Add solution and test-cases for problem 402
0xff-dev Apr 11, 2024
62e17cc
Add solution and test-cases for problem 738
0xff-dev Apr 11, 2024
9301aa7
Add solution and test-cases for problem 2487
0xff-dev Apr 12, 2024
26e199c
Add solution and test-cases for problem 90
0xff-dev Apr 13, 2024
309839f
Add solution and test-cases for problem 1769
0xff-dev Apr 15, 2024
8987924
Add solution and test-cases for problem 594
0xff-dev Apr 16, 2024
83f07dd
Add solution and test-cases for problem 553
0xff-dev Apr 17, 2024
1dd4728
Add solution and test-cases for problem 559
0xff-dev Apr 18, 2024
7ea0ad9
Add solution and test-cases for problem 650
0xff-dev Apr 18, 2024
2cd6163
Add solution and test-cases for problem 788
0xff-dev Apr 19, 2024
40d6077
Add solution and test-cases for problem 1525
0xff-dev Apr 20, 2024
1dc23dd
Add solution and test-cases for problem 2641
0xff-dev Apr 21, 2024
155aa22
Add solution and test-cases for problem 752
0xff-dev Apr 22, 2024
c93521d
Add solution and test-cases for problem 310
0xff-dev Apr 23, 2024
9fe4fb3
Add solution and test-cases for problem 633
0xff-dev Apr 24, 2024
0e62393
Add solution and test-cases for problem 529
0xff-dev Apr 24, 2024
f3dc0e5
Add solution and test-cases for problem 2370
0xff-dev Apr 25, 2024
eea84ff
Add solution and test-cases for problem 671
0xff-dev Apr 26, 2024
d2166fb
Add solution and test-cases for problem 514
0xff-dev Apr 27, 2024
fc1ec9e
Add solution and test-cases for problem 2997
0xff-dev Apr 29, 2024
6461d33
Add solution and test-cases for problem 994
0xff-dev Apr 29, 2024
f830be9
Add solution and test-cases for problem 1915
0xff-dev Apr 30, 2024
67b464a
Add solution and test-cases for problem 1542
0xff-dev Apr 30, 2024
6df5b1c
Add solution and test-cases for problem 410
0xff-dev May 1, 2024
2381c30
Add solution and test-cases for problem 813
0xff-dev May 1, 2024
2c36a83
Add solution and test-cases for problem 2441
0xff-dev May 2, 2024
71d166d
Add solution and test-cases for problem 1442
0xff-dev May 3, 2024
3801048
Add solution and test-cases for problem 2302
0xff-dev May 3, 2024
f9acb7e
Add solution and test-cases for problem 354
0xff-dev May 4, 2024
d3d3a8d
add 3001-3100 problems. add solution and test-cases for problem 3085
0xff-dev May 5, 2024
953c021
Add solution and test-cases for problem 303
0xff-dev May 6, 2024
7349059
Add solution and test-cases for problem 2816
0xff-dev May 7, 2024
2f92c3e
Add solution and test-cases for problem 506
0xff-dev May 8, 2024
9a0109c
Add solution and test-cases for problem 1288
0xff-dev May 10, 2024
26341bd
Add solution and test-cases for problem 857
0xff-dev May 11, 2024
33d898b
Add solution and test-cases for problem 2373
0xff-dev May 12, 2024
56fe42c
Add solution and test-cases for problem 1553
0xff-dev May 12, 2024
e5621ec
Add solution and test-cases for problem 861
0xff-dev May 13, 2024
f564eee
Add solution and test-cases for problem 1219
0xff-dev May 14, 2024
ced6762
Merge pull request #880 from 0xff-dev/1219
6boris May 15, 2024
77dd676
Add solution and test-cases for problem 2331
0xff-dev May 16, 2024
3f01ee1
Add solution and test-cases for problem 2491
0xff-dev May 17, 2024
d529fb7
Add solution and test-cases for problem 1863
0xff-dev May 20, 2024
3a9e79d
Add solution and test-cases for problem 1781
0xff-dev May 22, 2024
0ba1e50
Add solution and test-cases for problem 900
0xff-dev May 24, 2024
60eb865
Add solution and test-cases for problem 552
0xff-dev May 26, 2024
399e43a
Add solution and test-cases for problem 641
0xff-dev May 27, 2024
ce6ebee
Add solution and test-cases for problem 1208
0xff-dev May 28, 2024
7d8171d
Add solution and test-cases for problem 1404
0xff-dev May 29, 2024
786550c
Add solution and test-cases for problem 2284
0xff-dev May 30, 2024
8954745
Add solution and test-cases for problem 1823
0xff-dev May 31, 2024
2d20d3d
Add solution and test-cases for problem 622
0xff-dev Jun 2, 2024
7ad68f8
Add solution and test-cases for problem 2486
0xff-dev Jun 3, 2024
2f97f49
Add solution and test-cases for problem 1352
0xff-dev Jun 4, 2024
b5c37ee
Add solution and test-cases for problem 2807
0xff-dev Jun 6, 2024
4454118
Merge pull request #895 from 0xff-dev/2807
6boris Jun 6, 2024
e35d540
Merge pull request #894 from 0xff-dev/1352
6boris Jun 6, 2024
d4251e0
Merge pull request #893 from 0xff-dev/2486
6boris Jun 6, 2024
fbfd5ce
Merge pull request #892 from 0xff-dev/622
6boris Jun 6, 2024
433ae70
Merge pull request #891 from 0xff-dev/1823
6boris Jun 6, 2024
31150d9
Merge pull request #890 from 0xff-dev/2284
6boris Jun 6, 2024
7212fed
Merge pull request #889 from 0xff-dev/1404
6boris Jun 6, 2024
c2ab7c3
Merge pull request #888 from 0xff-dev/1208
6boris Jun 6, 2024
ca94e3c
Merge pull request #887 from 0xff-dev/641
6boris Jun 6, 2024
59d2416
Merge pull request #886 from 0xff-dev/552
6boris Jun 6, 2024
5e7b676
Merge pull request #885 from 0xff-dev/900
6boris Jun 6, 2024
20a9e6d
Merge pull request #884 from 0xff-dev/1781
6boris Jun 6, 2024
edea25d
Merge pull request #883 from 0xff-dev/1863
6boris Jun 6, 2024
09c8cb4
Merge pull request #882 from 0xff-dev/2491
6boris Jun 6, 2024
a68ee71
Merge pull request #881 from 0xff-dev/2331
6boris Jun 6, 2024
e0f8926
Merge pull request #879 from 0xff-dev/861
6boris Jun 6, 2024
f3d5710
Merge pull request #878 from 0xff-dev/1553
6boris Jun 6, 2024
b3c1872
Merge pull request #877 from 0xff-dev/2373
6boris Jun 6, 2024
670d1ec
Merge pull request #876 from 0xff-dev/857
6boris Jun 6, 2024
e032727
Merge pull request #875 from 0xff-dev/1288
6boris Jun 6, 2024
320463b
Merge pull request #874 from 0xff-dev/506
6boris Jun 6, 2024
c2e418d
Merge pull request #873 from 0xff-dev/2816
6boris Jun 6, 2024
9f7f475
Merge pull request #872 from 0xff-dev/303
6boris Jun 6, 2024
061eba5
Merge pull request #871 from 0xff-dev/add-3001-3100
6boris Jun 6, 2024
5fce35a
Merge pull request #870 from 0xff-dev/354
6boris Jun 6, 2024
e3ea188
Merge pull request #869 from 0xff-dev/2302
6boris Jun 6, 2024
c8ff7b5
Merge pull request #868 from 0xff-dev/1442
6boris Jun 6, 2024
84e9c19
Merge pull request #867 from 0xff-dev/2441
6boris Jun 6, 2024
627fa8c
Merge pull request #866 from 0xff-dev/813
6boris Jun 6, 2024
b6c05a0
Merge pull request #865 from 0xff-dev/410
6boris Jun 6, 2024
6820b44
Merge pull request #864 from 0xff-dev/1542
6boris Jun 6, 2024
74896c5
Merge pull request #863 from 0xff-dev/1915
6boris Jun 6, 2024
3f931d5
Merge pull request #862 from 0xff-dev/994
6boris Jun 6, 2024
802575a
Merge pull request #861 from 0xff-dev/2997
6boris Jun 6, 2024
c9408f7
Merge pull request #860 from 0xff-dev/514
6boris Jun 6, 2024
a5b7a6c
Merge pull request #859 from 0xff-dev/671
6boris Jun 6, 2024
6978bf0
Merge pull request #858 from 0xff-dev/2370
6boris Jun 6, 2024
fdc40f4
Merge pull request #857 from 0xff-dev/529
6boris Jun 6, 2024
6bcf4e9
Merge pull request #856 from 0xff-dev/633
6boris Jun 6, 2024
66aca24
Merge pull request #855 from 0xff-dev/310
6boris Jun 6, 2024
ec47cff
Merge pull request #854 from 0xff-dev/752
6boris Jun 6, 2024
ffe3acc
Merge pull request #853 from 0xff-dev/2641
6boris Jun 6, 2024
022b1b0
Merge pull request #852 from 0xff-dev/1525
6boris Jun 6, 2024
2b62da3
Merge pull request #851 from 0xff-dev/788
6boris Jun 6, 2024
f8c96ee
Merge pull request #849 from 0xff-dev/650
6boris Jun 6, 2024
a52b3ea
Merge pull request #848 from 0xff-dev/559
6boris Jun 6, 2024
ff998b5
Merge pull request #847 from 0xff-dev/553
6boris Jun 6, 2024
156d315
Merge pull request #846 from 0xff-dev/594
6boris Jun 6, 2024
4c1029a
Merge pull request #845 from 0xff-dev/1769
6boris Jun 6, 2024
80c7613
Merge pull request #844 from 0xff-dev/90
6boris Jun 6, 2024
26b6232
Merge pull request #843 from 0xff-dev/2487
6boris Jun 6, 2024
7eccf9f
Merge pull request #842 from 0xff-dev/738
6boris Jun 6, 2024
e0772cc
Merge pull request #841 from 0xff-dev/402
6boris Jun 6, 2024
138a64e
Merge pull request #840 from 0xff-dev/950
6boris Jun 6, 2024
ef44940
Merge pull request #839 from 0xff-dev/2073
6boris Jun 6, 2024
57d3767
Merge pull request #838 from 0xff-dev/289
6boris Jun 6, 2024
f6c248b
Merge pull request #837 from 0xff-dev/1700
6boris Jun 6, 2024
6e2ccbc
Merge pull request #836 from 0xff-dev/678
6boris Jun 6, 2024
c6f5d34
Merge pull request #835 from 0xff-dev/1249
6boris Jun 6, 2024
066b51b
Merge pull request #834 from 0xff-dev/1296
6boris Jun 6, 2024
f9906ee
Merge pull request #820 from 0xff-dev/851
6boris Jun 6, 2024
4d24e0f
Merge pull request #821 from 0xff-dev/795
6boris Jun 6, 2024
28f59a6
Merge pull request #822 from 0xff-dev/41
6boris Jun 6, 2024
d8ca883
Merge pull request #823 from 0xff-dev/713
6boris Jun 6, 2024
64cb4fd
Merge pull request #824 from 0xff-dev/2958
6boris Jun 6, 2024
ab66aa7
Merge pull request #825 from 0xff-dev/592
6boris Jun 6, 2024
13b8449
Merge pull request #826 from 0xff-dev/2962
6boris Jun 6, 2024
995d975
Merge pull request #827 from 0xff-dev/992
6boris Jun 6, 2024
cde2b0c
Merge pull request #828 from 0xff-dev/99
6boris Jun 6, 2024
9a5af02
Merge pull request #829 from 0xff-dev/1109
6boris Jun 6, 2024
917c74b
Merge pull request #830 from 0xff-dev/781
6boris Jun 6, 2024
2a62fbb
Merge pull request #831 from 0xff-dev/500
6boris Jun 6, 2024
b8bd73e
Merge pull request #832 from 0xff-dev/1614
6boris Jun 6, 2024
1d8a9d2
Merge pull request #833 from 0xff-dev/846
6boris Jun 6, 2024
c329102
update go mod
6boris Jun 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 5 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,14 @@ jobs:
name: Test Solution Cases
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.16
uses: actions/setup-go@v1
with:
go-version: 1.16
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
id: go
- name: Get dependencies
run: go mod download

- name: Test Solutions
run: make test

1 change: 1 addition & 0 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func main() {
//leetcode.MakeDirFromTo(problems, 2201, 2300)
//leetcode.MakeDirFromTo(problems, 2301, 2400)
//leetcode.MakeDirFromTo(problems, 2401, 2500)
//leetcode.MakeDirFromTo(problems, 2901, 3000)

// leetcode.MakeDir(problems)

Expand Down
40 changes: 19 additions & 21 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,35 +1,33 @@
module awesome-golang-algorithm

go 1.< F438 span class="x x-first x-last">21
go 1.22

require (
github.com/imroc/req/v3 v3.41.6
github.com/stretchr/testify v1.7.0
github.com/imroc/req/v3 v3.43.7
github.com/stretchr/testify v1.9.0
)

require (
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/andybalholm/brotli v1.1.0 // indirect
github.com/cloudflare/circl v1.3.8 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/gaukas/godicttls v0.0.4 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/google/pprof v0.0.0-20230811205829-9131a7e9cc17 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/google/pprof v0.0.0-20240528025155-186aa0362fba // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/kr/pretty v0.1.0 // indirect
github.com/onsi/ginkgo/v2 v2.11.0 // indirect
github.com/klauspost/compress v1.17.8 // indirect
github.com/onsi/ginkgo/v2 v2.19.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/qtls-go1-20 v0.3.2 // indirect
github.com/quic-go/quic-go v0.37.4 // indirect
github.com/refraction-networking/utls v1.4.3 // indirect
golang.org/x/crypto v0.12.0 // indirect
golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/text v0.12.0 // indirect
golang.org/x/tools v0.12.0 // indirect
github.com/quic-go/quic-go v0.45.0 // indirect
github.com/refraction-networking/utls v1.6.6 // indirect
go.uber.org/mock v0.4.0 // indirect
golang.org/x/crypto v0.24.0 // indirect
golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 // indirect
golang.org/x/mod v0.18.0 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/tools v0.22.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
131 changes: 49 additions & 82 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,96 +1,63 @@
github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs=
github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M=
github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY=
github.com/cloudflare/circl v1.3.8 h1:j+V8jJt09PoeMFIu2uh5JUyEaIHTXVOHslFoLNAKqwI=
github.com/cloudflare/circl v1.3.8/go.mod h1:PDRU+oXvdD7KCtgKxW95M5Z8BpSCJXQORiZFnBQS5QU=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/gaukas/godicttls v0.0.4 h1:NlRaXb3J6hAnTmWdsEKb9bcSBD6BvcIjdGdeb0zfXbk=
github.com/gaukas/godicttls v0.0.4/go.mod h1:l6EenT4TLWgTdwslVb4sEMOCf7Bv0JAK67deKr9/NCI=
github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ=
github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI=
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls=
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/pprof v0.0.0-20230811205829-9131a7e9cc17 h1:0h35ESZ02+hN/MFZb7XZOXg+Rl9+Rk8fBIf5YLws9gA=
github.com/google/pprof v0.0.0-20230811205829-9131a7e9cc17/go.mod h1:Jh3hGz2jkYak8qXPD19ryItVnUgpgeqzdkY/D0EaeuA=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/pprof v0.0.0-20240528025155-186aa0362fba h1:ql1qNgCyOB7iAEk8JTNM+zJrgIbnyCKX/wdlyPufP5g=
github.com/google/pprof v0.0.0-20240528025155-186aa0362fba/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
github.com/imroc/req/v3 v3.41.6 h1:6plc4nRryRQh9vw16vAdysAZoF9m6h/V9TtdHIIWLyo=
github.com/imroc/req/v3 v3.41.6/go.mod h1:JxpRRITYTOcuqQJxHSPVvEKhAL9ayo7BpUXHbL2T5IE=
github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I=
github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU=
github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM=
github.com/onsi/gomega v1.27.8 h1:gegWiwZjBsf2DgiSbf5hpokZ98JVDMcWkUiigk6/KXc=
github.com/onsi/gomega v1.27.8/go.mod h1:2J8vzI/s+2shY9XHRApDkdgPo1TKT7P2u6fXeJKFnNQ=
github.com/imroc/req/v3 v3.43.7 h1:dOcNb9n0X83N5/5/AOkiU+cLhzx8QFXjv5MhikazzQA=
github.com/imroc/req/v3 v3.43.7/go.mod h1:SQIz5iYop16MJxbo8ib+4LnostGCok8NQf8ToyQc2xA=
github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU=
github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA=
github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To=
github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk=
github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo=
github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A=
github.com/quic-go/qtls-go1-20 v0.3.2 h1:rRgN3WfnKbyik4dBV8A6girlJVxGand/d+jVKbQq5GI=
github.com/quic-go/qtls-go1-20 v0.3.2/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k=
github.com/quic-go/quic-go v0.37.4 h1:ke8B73yMCWGq9MfrCCAw0Uzdm7GaViC3i39dsIdDlH4=
github.com/quic-go/quic-go v0.37.4/go.mod h1:YsbH1r4mSHPJcLF4k4zruUkLBqctEMBDR6VPvcYjIsU=
github.com/refraction-networking/utls v1.4.3 h1:BdWS3BSzCwWCFfMIXP3mjLAyQkdmog7diaD/OqFbAzM=
github.com/refraction-networking/utls v1.4.3/go.mod h1:4u9V/awOSBrRw6+federGmVJQfPtemEqLBXkML1b0bo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk=
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb h1:mIKbk8weKhSeLH2GmUTrvx8CjkyJmnU1wFmg59CUjFA=
golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14=
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc=
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss=
golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
github.com/quic-go/quic-go v0.45.0 h1:OHmkQGM37luZITyTSu6ff03HP/2IrwDX1ZFiNEhSFUE=
github.com/quic-go/quic-go v0.45.0/go.mod h1:1dLehS7TIR64+vxGR70GDcatWTOtMX2PUtnKsjbTurI=
github.com/refraction-networking/utls v1.6.6 h1:igFsYBUJPYM8Rno9xUuDoM5GQrVEqY4llzEXOkL43Ig=
github.com/refraction-networking/utls v1.6.6/go.mod h1:BC3O4vQzye5hqpmDTWUqi4P5DDhzJfkV1tdqtawQIH0=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU=
go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI=
golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM=
golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 h1:LoYXNGAShUG3m/ehNk4iFctuhGX/+R1ZpfJ4/ia80JM=
golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI=
golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0=
golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=
golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA=
golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
13 changes: 7 additions & 6 deletions leetcode/1-100/0011.Container-With-Most-Water/Solution.go
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
package Solution

func maxArea(height []int) int {
max, l, r := 0, 0, len(height)-1
ans, l, r := 0, 0, len(height)-1
for l < r {
// 获取当前的坐标形成的面积
/*
1.Min(height[l], height[r]) : 获取当前左右最小高度【面积需要最小高】
2. Min(height[l], height[r])*(r-l) : 获取当前可以形成的面积
2.Min(height[l], height[r])*(r-l) : 获取当前可以形成的面积
3.Max(max, Min(height[l], height[r])*(r-l)): 获取目前最大面积
*/
max = Max(max, Min(height[l], height[r])*(r-l))
ans = max(ans, min(height[l], height[r])*(r-l))
if height[l] < height[r] {
l++
} else {
r--
}
}
return max

return ans
}

func Max(x, y int) int {
func max(x, y int) int {
if x > y {
return x
}
return y
}

func Min(x, y int) int {
func min(x, y int) int {
if x > y {
return y
}
Expand Down
37 changes: 37 additions & 0 deletions leetcode/1-100/0041.First-Missing-Positive/README.md
1CF5
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# [41.First Missing Positive][title]

## Description
Given an unsorted integer array `nums`. Return the smallest positive integer that is not present in `nums`.

You must implement an algorithm that runs in `O(n)` time and uses `O(1)` auxiliary space.

**Example 1:**

```
Input: nums = [1,2,0]
Output: 3
Explanation: The numbers in the range [1,2] are all in the array.
```

**Example 2:**

```
Input: nums = [3,4,-1,1]
Output: 2
Explanation: 1 is in the array but 2 is missing.
```

**Example 3:**

```
Input: nums = [7,8,9,11,12]
Output: 1
Explanation: The smallest positive integer 1 is missing.
```

## 结语

如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me]

[title]: https://leetcode.com/problems/first-missing-positive
[me]: https://github.com/kylesliu/awesome-golang-algorithm
27 changes: 25 additions & 2 deletions leetcode/1-100/0041.First-Missing-Positive/Solution.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
package Solution

func Solution(x bool) bool {
return x
func Solution(nums []int) int {
n := len(nums)
j := -1
for i := 0; i < n; i++ {
if nums[i] > 0 {
j++
nums[i], nums[j] = nums[j], nums[i]
}
}
j++
for i := 0; i < j; i++ {
source := nums[i]
if source < 0 {
source = -source
}
if source <= j && nums[source-1] > 0 {
nums[source-1] = -nums[source-1]
}
}
for i := 0; i < j; i++ {
if nums[i] > 0 {
return i + 1
}
}
return j + 1
}
14 changes: 7 additions & 7 deletions leetcode/1-100/0041.First-Missing-Positive/Solution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ func TestSolution(t *testing.T) {
// 测试用例
cases := []struct {
name string
inputs bool
expect bool
inputs []int
expect int
}{
{"TestCacse 1", true, true},
{"TestCacse 1", true, true},
{"TestCacse 1", false, false},
{"TestCacse1", []int{1, 2, 0}, 3},
{"TestCacse2", []int{3, 4, -1, 1}, 2},
{"TestCacse3", []int{7, 8, 9, 11, 12}, 1},
}

// 开始测试
Expand All @@ -29,10 +29,10 @@ func TestSolution(t *testing.T) {
}
}

// 压力测试
// 压力测试
func BenchmarkSolution(b *testing.B) {
}

// 使用案列
// 使用案列
func ExampleSolution() {
}
Loading
0