Skip to content

Commit 7f564b1

Browse files
authored
Merge branch 'main' into feat-1048
2 parents 8a65c00 + 7f063a1 commit 7f564b1

File tree

2,156 files changed

+90398
-39371
lines changed

Some content is hidden

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

2,156 files changed

+90398
-39371
lines changed

.github/workflows/black-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818
- uses: jpetrucciani/black-check@master
1919
with:
2020
black_flags: '-S'
Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,17 @@
11
name: clang-format-linter
22

33
on:
4-
pull_request_target:
5-
types:
6-
- opened
7-
- edited
8-
- synchronize
9-
branches:
10-
- main
4+
push: {}
5+
pull_request: {}
116

127
jobs:
138
build:
149
runs-on: ubuntu-latest
1510

1611
steps:
17-
- uses: actions/checkout@v3
18-
19-
- uses: DoozyX/clang-format-lint-action@v0.13
12+
- uses: actions/checkout@v4
13+
- uses: DoozyX/clang-format-lint-action@v0.16.2
2014
with:
2115
source: '.'
2216
extensions: 'c,cpp,java'
23-
clangFormatVersion: 12
24-
inplace: True
25-
26-
- uses: EndBug/add-and-commit@v9
27-
with:
28-
committer_name: yanglbme
29-
committer_email: contact@yanglibin.info
30-
message: 'chore: format code with clang-format'
31-
env:
32-
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}
17+
clangFormatVersion: 16

.github/workflows/compress.yml

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,50 @@
11
name: compress-images
22

33
on:
4-
schedule:
5-
- cron: "0 0 * * 3"
4+
pull_request:
5+
paths:
6+
- '**.jpg'
7+
- '**.jpeg'
8+
- '**.png'
9+
- '**.webp'
10+
push:
11+
branches:
12+
- main
13+
paths:
14+
- '**.jpg'
15+
- '**.jpeg'
16+
- '**.png'
17+
- '**.webp'
618
workflow_dispatch:
7-
19+
schedule:
20+
- cron: '00 23 * * 0'
821
jobs:
9-
compress:
22+
build:
23+
name: calibreapp/image-actions
1024
runs-on: ubuntu-latest
11-
if: github.repository == 'doocs/leetcode'
25+
# Only run on main repo on and PRs that match the main repo.
26+
if: |
27+
github.repository == 'doocs/leetcode' &&
28+
(github.event_name != 'pull_request' ||
29+
github.event.pull_request.head.repo.full_name == github.repository)
1230
steps:
1331
- name: Checkout Branch
14-
uses: actions/checkout@v2
15-
32+
uses: actions/checkout@v4
1633
- name: Compress Images
1734
id: calibre
1835
uses: calibreapp/image-actions@main
1936
with:
20-
githubToken: ${{ secrets.ACTION_TOKEN }}
21-
compressOnly: true
22-
23-
- name: Commit Files
24-
if: |
25-
steps.calibre.outputs.markdown != ''
26-
run: |
27-
git config --local user.email "szuyanglb@outlook.com"
28-
git config --local user.name "yanglbme"
29-
git commit -m "chore: auto compress images" -a
30-
31-
- name: Push Changes
37+
githubToken: ${{ secrets.DOOCS_BOT_ACTION_TOKEN }}
38+
# For non-Pull Requests, run in compressOnly mode and we'll PR after.
39+
compressOnly: ${{ github.event_name != 'pull_request' }}
40+
- name: Create Pull Request
41+
# If it's not a Pull Request then commit any changes as a new PR.
3242
if: |
43+
github.event_name != 'pull_request' &&
3344
steps.calibre.outputs.markdown != ''
34-
uses: ad-m/github-push-action@master
45+
uses: peter-evans/create-pull-request@v4
3546
with:
36-
github_token: ${{ secrets.ACTION_TOKEN }}
47+
title: 'chore: auto compress images'
48+
branch-suffix: timestamp
49+
commit-message: 'chore: auto compress images'
50+
body: ${{ steps.calibre.outputs.markdown }}

.github/workflows/pr-add-label.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: pr-add-label
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, edited, reopened, synchronize]
6+
7+
jobs:
8+
add-label:
9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check PR number
15+
id: pr_number
16+
run: echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV
17+
18+
- name: Run add-label Action
19+
uses: thinkasany/pr-label-action@master
20+
with:
21+
github_token: ${{ secrets.DOOCS_BOT_ACTION_TOKEN }}
22+
pr_number: ${{ env.PR_NUMBER }}
23+
organize_name: "doocs"
24+
team_name: "leetcode-algorithm"

.github/workflows/pr-checker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- name: Pull request
1212
uses: actions-cool/maintain-one-comment@v3
1313
with:
14-
token: ${{ secrets.GITHUB_TOKEN }}
14+
token: ${{ secrets.DOOCS_BOT_ACTION_TOKEN }}
1515
body: |
1616
🤭 感谢你的提交,请检查你的改动是否符合以下项目规范。
1717

.github/workflows/starcharts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
steps:
1414
- uses: MaoLongLong/actions-starcharts@main
1515
with:
16-
github_token: ${{ secrets.ACTION_TOKEN }}
16+
github_token: ${{ secrets.DOOCS_BOT_ACTION_TOKEN }}
1717
svg_path: images/starcharts.svg
1818
commit_message: "chore: auto update starcharts"
1919
stars_change: ${{ secrets.STARS_CHANGE }}

.prettierignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ node_modules/
1414
/solution/bash_problem_readme_template.md
1515
/solution/bash_problem_readme_template_en.md
1616
/solution/0100-0199/0177.Nth Highest Salary/Solution.sql
17-
/solution/0600-0699/0627.Swap Salary/Solution.sql
1817
/solution/1400-1499/1454.Active Users/Solution.sql
1918
/solution/1400-1499/1484.Group Sold Products By The Date/Solution.sql
2019
/solution/1500-1599/1511.Customer Order Frequency/Solution.sql

.prettierrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"semi": true,
55
"singleQuote": true,
66
"trailingComma": "all",
7+
"printWidth": 100,
78
"bracketSpacing": true,
89
"arrowParens": "avoid",
910
"phpVersion": "8.1",
@@ -18,6 +19,7 @@
1819
"solution/0600-0699/0610.Triangle Judgement/Solution.sql",
1920
"solution/0600-0699/0618.Students Report By Geography/Solution.sql",
2021
"solution/0600-0699/0626.Exchange Seats/Solution.sql",
22+
"solution/0600-0699/0627.Swap Salary/Solution.sql",
2123
"solution/1000-1099/1097.Game Play Analysis V/Solution.sql",
2224
"solution/1000-1099/1098.Unpopular Books/Solution.sql",
2325
"solution/1100-1199/1113.Reported Posts/Solution.sql",

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
</p>
44

55
<p align="center">
6-
<a href="https://github.com/doocs/leetcode"><img src="https://img.shields.io/badge/langs-Java%20%7C%20Python%20%7C%20C%2B%2B%20%7C%20Go%20%7C%20TypeScript%20%7C%20...-red?style=flat-square&color=42b883" alt="languages"></a>
76
<a href="https://doocs.github.io/#/?id=how-to-join"><img src="https://img.shields.io/badge/organization-join%20us-42b883?style=flat-square" alt="open-source-organization"></a>
7+
<a href="https://github.com/doocs/leetcode"><img src="https://img.shields.io/badge/langs-Python%20%7C%20Java%20%7C%20C++%20%7C%20Go%20%7C%20TypeScript%20%7C%20Rust%20%7C%20...-red?style=flat-square&color=42b883" alt="languages"></a>
88
<a href="https://github.com/doocs/leetcode/blob/main/LICENSE"><img src="https://img.shields.io/github/license/doocs/leetcode?color=42b883&style=flat-square" alt="LICENSE"></a><br>
99
<a href="https://opencollective.com/doocs-leetcode/backers/badge.svg" alt="backers on Open Collective"><img src="https://img.shields.io/opencollective/backers/doocs-leetcode?color=42b883&style=flat-square&logo=open%20collective&logoColor=ffffff" /></a>
1010
<a href="https://github.com/doocs/leetcode/stargazers"><img src="https://img.shields.io/github/stars/doocs/leetcode?color=42b883&logo=github&style=flat-square" alt="stars"></a>
@@ -31,6 +31,11 @@
3131
- [剑指 Offer(专项突击版)](/lcof2/README.md)
3232
- [程序员面试金典(第 6 版)](/lcci/README.md)
3333

34+
## 专项突破
35+
36+
- [JavaScript 专项练习](/solution/JAVASCRIPT_README.md)
37+
- [数据库专项练习](/solution/DATABASE_README.md)
38+
3439
## 算法提升专题
3540

3641
### 1. 基础算法

README_EN.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
</p>
44

55
<p align="center">
6-
<a href="https://github.com/doocs/leetcode"><img src="https://img.shields.io/badge/langs-Java%20%7C%20Python%20%7C%20C%2B%2B%20%7C%20Go%20%7C%20TypeScript%20%7C%20...-red?style=flat-square&color=42b883" alt="languages"></a>
76
<a href="https://doocs.github.io/#/?id=how-to-join"><img src="https://img.shields.io/badge/organization-join%20us-42b883?style=flat-square" alt="open-source-organization"></a>
7+
<a href="https://github.com/doocs/leetcode"><img src="https://img.shields.io/badge/langs-Python%20%7C%20Java%20%7C%20C++%20%7C%20Go%20%7C%20TypeScript%20%7C%20Rust%20%7C%20...-red?style=flat-square&color=42b883" alt="languages"></a>
88
<a href="https://github.com/doocs/leetcode/blob/main/LICENSE"><img src="https://img.shields.io/github/license/doocs/leetcode?color=42b883&style=flat-square" alt="LICENSE"></a><br>
99
<a href="https://opencollective.com/doocs-leetcode/backers/badge.svg" alt="backers on Open Collective"><img src="https://img.shields.io/opencollective/backers/doocs-leetcode?color=42b883&style=flat-square&logo=open%20collective&logoColor=ffffff" /></a>
1010
<a href="https://github.com/doocs/leetcode/stargazers"><img src="https://img.shields.io/github/stars/doocs/leetcode?color=42b883&logo=github&style=flat-square" alt="stars"></a>
@@ -32,6 +32,11 @@ The repository is maintained by the Doocs community, and please give us a [star]
3232
- [LCOF: Coding Interviews, 2nd Edition](/lcof/README_EN.md)
3333
- [LCCI: Cracking the Coding Interview, 6th Edition](/lcci/README_EN.md)
3434

35+
## JavaScript & Database Practice
36+
37+
- [JavaScript Practice](/solution/JAVASCRIPT_README_EN.md)
38+
- [Database Practice](/solution/DATABASE_README_EN.md)
39+
3540
## Topics
3641

3742
### 1. Basic Algorithms

0 commit comments

Comments
 (0)