Skip to content

[pull] main from doocs:main #489

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 92 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
8c8d9c6
chore: update workflow
acbin Apr 25, 2025
c86e351
chore: update deploy.yml
acbin Apr 26, 2025
a6cf378
chore: update deploy workflow
acbin Apr 26, 2025
4f47587
chore: update workflows
acbin Apr 26, 2025
3aad112
chore: update .gitignore
acbin Apr 26, 2025
7fc7b5c
feat: update solutions to lc problem: No.2444 (#4373)
yanglbme Apr 26, 2025
089e43d
chore: update deploy workflow
yanglbme Apr 26, 2025
7db519a
chore: update workflows
yanglbme Apr 26, 2025
186aa5e
feat: add rust solution to lc problem: No.3392 (#4375)
yanglbme Apr 26, 2025
303a9cc
docs: add deepwiki badge (#4376)
thinkasany Apr 27, 2025
6823f28
feat: add rust solution to lc problem: No.2300 (#4377)
yanglbme Apr 27, 2025
7ccaed7
chore: auto update starcharts
idoocs Apr 29, 2025
43b825f
feat: add solutions to lc problem: No.1295 (#4378)
yanglbme Apr 29, 2025
7fb7d02
feat: add new lc problems (#4379)
yanglbme Apr 30, 2025
7d76370
feat: add solutions to lc problem: No.3528 (#4380)
yanglbme Apr 30, 2025
39eaf17
feat: add solutions to lc problem: No.3527 (#4381)
yanglbme May 1, 2025
562547b
feat: add solutions to lc problem: No.2071 (#4382)
yanglbme May 1, 2025
bed93c3
feat: add solutions to lc problem: No.0838 (#4383)
yanglbme May 2, 2025
1bf0fe3
feat: add solutions to lc problem: No.1007 (#4384)
yanglbme May 2, 2025
9877046
feat: add solutions to lc problem: No.1128 (#4386)
yanglbme May 3, 2025
c75bdf1
feat: add solutions to lc problem: No.3531 (#4387)
yanglbme May 4, 2025
2868b7d
feat: add solutions to lc problem: No.3532 (#4388)
yanglbme May 4, 2025
7cfd1f3
feat: add solutions to lc problem: No.0790 (#4389)
yanglbme May 4, 2025
c34a0d2
feat: add weekly contest 448 (#4390)
yanglbme May 5, 2025
b124017
fix: update solutions to lc problems: No.3341,3342 (#4391)
yanglbme May 6, 2025
15dd23d
chore: auto update starcharts
idoocs May 11, 2025
3f5067f
feat: add new lc problems (#4399)
yanglbme May 12, 2025
6fdcc26
feat: add solutions to lc problem: No.3541 (#4400)
yanglbme May 12, 2025
c85ac1d
feat: add solutions to lc problem: No.4545 (#4401)
yanglbme May 12, 2025
356cd7b
feat: add solutions to lc problem: No.3546 (#4402)
yanglbme May 12, 2025
170fd23
feat: add solutions to lc problem: No.3335 (#4404)
yanglbme May 13, 2025
ab51502
feat: add solutions to lc problem: No.3337 (#4405)
yanglbme May 13, 2025
b6b8817
feat: add solutions to lc problem: No.3337 (#4406)
yanglbme May 14, 2025
52f89c8
feat: update solutions to lc problems: No.2900,2901 (#4408)
yanglbme May 14, 2025
99a394b
feat: add solutions to lc problem: No.1477 (#4409)
yanglbme May 17, 2025
29ee80c
feat: update lc problems (#4410)
yanglbme May 18, 2025
a3979f7
feat: add solutions to lc problems: No.3550,3551 (#4411)
yanglbme May 18, 2025
8ec2624
feat: add solutions to lc problem: No.3552 (#4412)
yanglbme May 18, 2025
070dbb6
feat: add solutions to lc problem: No.3356 (#4413)
yanglbme May 19, 2025
49fea5c
feat: add rust solution to lc problem: No.0581 (#4414)
yanglbme May 20, 2025
81ba6c0
chore: add new lc problems (#4416)
yanglbme May 20, 2025
741bea8
feat: add solutions to lc problem: No.3555 (#4417)
yanglbme May 20, 2025
ffca226
feat: add solutions to lc problem: No.3554 (#4418)
yanglbme May 20, 2025
9dbf88f
feat: add solutions to lc problem: No.2009 (#4419)
yanglbme May 20, 2025
0482811
feat: add solutions to lc problems: No.2357,2358 (#4420)
yanglbme May 21, 2025
51a192d
feat: add solutions to lc problem: No.3362 (#4421)
yanglbme May 22, 2025
bd0eb2c
feat: update solutions to lc problem: No.3362
yanglbme May 22, 2025
9eb9ca9
feat: add c solution to lc problem: No.0001 (#4422)
pranjal030404 May 22, 2025
4217576
feat: add solutions to lc problem: No.2359 (#4423)
yanglbme May 23, 2025
6085f2f
feat: add solutions to lc problem: No.2942 (#4424)
yanglbme May 23, 2025
853735d
feat: add c solution to lc problem: No.0002 (#4426)
pranjal030404 May 23, 2025
7381ede
feat: add solutions to lc problem: No.2131 (#4428)
yanglbme May 25, 2025
6bbb968
feat: add new lc problems (#4429)
yanglbme May 25, 2025
b890898
feat: add solutions to lc problem: No.3556 (#4430)
yanglbme May 25, 2025
e188f51
feat: add weekly contest 451 (#4431)
yanglbme May 25, 2025
ec22c87
feat: add solutions to lc problem: No.1857 (#4432)
yanglbme May 25, 2025
3e3d06c
feat: add solutions to lc problem: No.0245 (#4433)
yanglbme May 25, 2025
b2a6267
feat: add c solutions to lc problems: No.0003,0004 (#4427)
pranjal030404 May 26, 2025
b5a542b
fix: resolve memory leak issue in No.0002 (#4434)
gaganxsaini May 26, 2025
1ebe39f
feat: add solutions to lc problem: No.2966 (#4435)
yanglbme May 26, 2025
40f3d8b
feat: add solutions to lc problem: No.3403 (#4436)
yanglbme May 26, 2025
afa39bd
feat: update lc problems (#4438)
yanglbme May 26, 2025
185c94f
feat: add solutions to lc problem: No.3565 (#4439)
yanglbme May 27, 2025
ce35926
feat: add solutions to lc problem: No.0147 (#4437)
taoyq1988 May 27, 2025
aca2202
chore: auto compress images (#4440)
github-actions[bot] May 27, 2025
8e777ff
feat: add solutions to lc problem: No.0269 (#4441)
taoyq1988 May 27, 2025
352832e
feat: add solutions to lc problem: No.3560 (#4443)
yanglbme May 27, 2025
30d02ab
feat: add solutions to lc problem: No.3561 (#4444)
yanglbme May 27, 2025
7c2ed94
feat: add rust solutions to lc problems: No.3372,3373 (#4445)
yanglbme May 27, 2025
8aca291
feat: add cpp solution to lc problem No.0008 (#4442)
gaganxsaini May 27, 2025
6ae2c07
chore: auto update starcharts
idoocs May 28, 2025
dd076f7
chore: add missing image (#4447)
yanglbme May 28, 2025
18565c4
feat: add solutions to lc problem: No.1061 (#4448)
yanglbme May 28, 2025
c7a3051
feat: update lc problems (#4449)
yanglbme May 28, 2025
3ddd4aa
feat: add solutions to lc problem: No.2359 (#4450)
yanglbme May 29, 2025
c6b4e43
feat: add solutions to lc problem: No.0909 (#4451)
yanglbme May 31, 2025
8c4bba2
feat: add solutions to lc problem: No.2929 (#4452)
yanglbme Jun 1, 2025
15f7077
feat: add new lc problems (#4453)
yanglbme Jun 2, 2025
90f55e9
feat: add solutions to lc problems: No.3566,3567 (#4454)
yanglbme Jun 2, 2025
befa1c5
feat: add solutions to lc problem: No.3568 (#4455)
yanglbme Jun 2, 2025
9716c9c
feat: add rust solution to lc problem: No.135 (#4456)
yanglbme Jun 2, 2025
13ca332
feat: add solutions to lc problem: No.1298 (#4457)
yanglbme Jun 2, 2025
490508b
feat: update lc problems (#4459)
yanglbme Jun 3, 2025
297e28c
feat: add solutions to lc problem: No.2616 (#4460)
yanglbme Jun 3, 2025
c520c5a
feat: add solutions to lc problem: No.3406 (#4461)
yanglbme Jun 4, 2025
6558818
feat: add solutions to lc problem: No.1061 (#4462)
yanglbme Jun 4, 2025
2e938eb
feat: add solutions to lc problem: No.3442 (#4463)
yanglbme Jun 4, 2025
58a5c21
feat: add solutions to lc problem: No.3405 (#4464)
yanglbme Jun 5, 2025
a774cc7
feat: add solutions to lc problem: No.2434 (#4465)
yanglbme Jun 5, 2025
ba46ac8
feat: add solutions to lc problem: No.3170 (#4466)
yanglbme Jun 7, 2025
078c02d
feat: add new lc problems (#4467)
yanglbme Jun 8, 2025
f5db36b
feat: add solutions to lc problem: No.3573 (#4468)
yanglbme Jun 8, 2025
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
  •  
  •  
  •  
79 changes: 61 additions & 18 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,72 +15,115 @@ on:
- basic/**

concurrency:
group: ${{github.workflow}} - ${{github.ref}}
group: ${{ github.workflow }} - ${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Checkout main branch
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Checkout docs branch
uses: actions/checkout@v4
with:
ref: docs
path: mkdocs
- run: |
mv -f mkdocs/* .
fetch-depth: 0

- name: Sync docs branch content
run: |
rsync -a --remove-source-files --exclude='.git' mkdocs/ ./
rm -rf mkdocs
mv solution/CONTEST_README.md docs/contest.md
mv solution/CONTEST_README_EN.md docs-en/contest.md

- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git config --global user.name github-actions[bot]
git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com

- uses: actions/setup-python@v5
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.x

- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- name: Restore pip cache
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-

- uses: actions/cache@v4
- name: Restore mkdocs-material cache
uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
key: mkdocs-material-${{ env.cache_id }}
restore-keys: |
mkdocs-material-

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
python3 -m pip install "mkdocs-material[imaging]"
sudo apt-get install pngquant
- name: Set MKDOCS_API_KEYS environment variable
sudo apt-get install -y pngquant

- name: Set MKDOCS_API_KEYS
run: echo "MKDOCS_API_KEYS=${{ secrets.MKDOCS_API_KEYS }}" >> $GITHUB_ENV

- run: |
- name: Build site
run: |
python3 main.py
mkdocs build -f mkdocs.yml
mkdocs build -f mkdocs-en.yml

- name: Generate CNAME file
- name: Generate CNAME
run: echo "leetcode.doocs.org" > ./site/CNAME

- name: Commit committer cache to docs branch
if: github.ref == 'refs/heads/main'
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
CACHE_FILE=".git-committers-cache.json"
if [[ ! -f "$CACHE_FILE" ]]; then
echo "Cache file not found; skip commit."
exit 0
fi

echo "Cloning docs branch ..."
git clone --depth 1 --branch docs "https://x-access-token:${GH_TOKEN}@github.com/${GH_REPO}.git" docs-cache
cp "$CACHE_FILE" docs-cache/

cd docs-cache
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com

git add .git-committers-cache.json
git commit -m "chore: update committer cache [skip ci]" || echo "No changes to commit"
git push origin docs

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./site

deploy:
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github_pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
.vscode
.temp
.vitepress
.cache
*.iml
__pycache__
/node_modules
/solution/result.json
/solution/__pycache__
/solution/.env
.cache
!.cache/plugin/
!.cache/plugin/git-committers/
!.cache/plugin/git-committers/page-authors.json
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
<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=4051B5&style=flat-square&logo=open%20collective&logoColor=ffffff" /></a>
<a href="https://github.com/doocs/leetcode/stargazers"><img src="https://img.shields.io/github/stars/doocs/leetcode?color=4051B5&logo=github&style=flat-square" alt="stars"></a>
<a href="https://github.com/doocs/leetcode/network/members"><img src="https://img.shields.io/github/forks/doocs/leetcode?color=4051B5&logo=github&style=flat-square" alt="forks"></a>
<a href="https://opencollective.com/doocs-leetcode/sponsors/badge.svg" alt="Sponsors on Open Collective"><img src="https://img.shields.io/opencollective/sponsors/doocs-leetcode?color=4051B5&style=flat-square&logo=open%20collective&logoColor=ffffff" /></a>
<a href="https://opencollective.com/doocs-leetcode/sponsors/badge.svg" alt="Sponsors on Open Collective"><img src="https://img.shields.io/opencollective/sponsors/doocs-leetcode?color=4051B5&style=flat-square&logo=open%20collective&logoColor=ffffff" /></a><br>
<a href="https://deepwiki.com/doocs/leetcode"><img src="https://img.shields.io/badge/chat%20with-DeepWiki-4051B5?style=flat-square" alt="deepwiki"></a>
</p>

## 介绍
Expand Down
3 changes: 2 additions & 1 deletion README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
<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=4051B5&style=flat-square&logo=open%20collective&logoColor=ffffff" /></a>
<a href="https://github.com/doocs/leetcode/stargazers"><img src="https://img.shields.io/github/stars/doocs/leetcode?color=4051B5&logo=github&style=flat-square" alt="stars"></a>
<a href="https://github.com/doocs/leetcode/network/members"><img src="https://img.shields.io/github/forks/doocs/leetcode?color=4051B5&logo=github&style=flat-square" alt="forks"></a>
<a href="https://opencollective.com/doocs-leetcode/sponsors/badge.svg" alt="Sponsors on Open Collective"><img src="https://img.shields.io/opencollective/sponsors/doocs-leetcode?color=4051B5&style=flat-square&logo=open%20collective&logoColor=ffffff" /></a>
<a href="https://opencollective.com/doocs-leetcode/sponsors/badge.svg" alt="Sponsors on Open Collective"><img src="https://img.shields.io/opencollective/sponsors/doocs-leetcode?color=4051B5&style=flat-square&logo=open%20collective&logoColor=ffffff" /></a><br>
<a href="https://deepwiki.com/doocs/leetcode"><img src="https://img.shields.io/badge/chat%20with-DeepWiki-4051B5?style=flat-square" alt="deepwiki"></a>
</p>

## Introduction
Expand Down
Loading