From 12324966979f12df9a99d45b60c2dfecf60d0790 Mon Sep 17 00:00:00 2001 From: erxiao <827574297wxxtb@sina.com> Date: Wed, 1 Nov 2023 13:53:31 -0400 Subject: [PATCH] add some solutions --- .../__pycache__/generate.cpython-312.pyc | Bin 20024 -> 20025 bytes assets/scripts/generate.py | 9 +- docs/.vuepress/config.js | 5 +- .../public/images/leetcode-js-logo.png | Bin 255623 -> 254591 bytes docs/.vuepress/public/images/react-logo.png | Bin 208330 -> 211914 bytes docs/leetcode/algorithm/1_recursion.md | 2 +- docs/leetcode/algorithm/9_two_pointer.md | 2 +- docs/leetcode/ds/1_linked_list.md | 4 +- docs/leetcode/outline/2_solution_list.md | 5 +- docs/leetcode/outline/3_categories_list.md | 8 +- docs/leetcode/outline/5_top_200_list.md | 8 +- docs/leetcode/outline/6_frequency_list.md | 14 +-- docs/leetcode/outline/7_company_list.md | 16 ++-- docs/leetcode/problem/0008.md | 2 +- docs/leetcode/problem/0020.md | 6 +- docs/leetcode/problem/0092.md | 70 ++++++++++++++ docs/leetcode/problem/0143.md | 86 ++++++++++++++++++ docs/leetcode/problem/0190.md | 8 +- docs/leetcode/problem/0234.md | 47 ++++++++++ docs/leetcode/problem/1047.md | 39 ++++---- docs/leetcode/problem/i_03.01.md | 5 +- docs/leetcode/solution/0001-0099.md | 3 +- docs/leetcode/solution/0100-0199.md | 1 + docs/leetcode/solution/0200-0299.md | 1 + .../\345\217\214\346\214\207\351\222\210.md" | 4 +- "docs/leetcode/solution/\346\240\210.md" | 4 +- .../solution/\351\200\222\345\275\222.md" | 4 +- .../solution/\351\223\276\350\241\250.md" | 6 +- 28 files changed, 290 insertions(+), 69 deletions(-) create mode 100644 docs/leetcode/problem/0092.md create mode 100644 docs/leetcode/problem/0143.md create mode 100644 docs/leetcode/problem/0234.md diff --git a/assets/scripts/__pycache__/generate.cpython-312.pyc b/assets/scripts/__pycache__/generate.cpython-312.pyc index 1ad06140d1c6321440970f6f318cd0d98392f855..d120608d4d46f75f49bb461cfb70b019c0cda713 100644 GIT binary patch delta 81 zcmdlnhjHf|M&8rByj%=G@ZyPMs?0{-otA7>EPA;qnww8siZiJPFm|}!;E|jWx*&9B l>;+xBi?VhHL@&y^oe;Yy>wl5Qzti^vGb3lfW=
P8u)
diff --git a/assets/scripts/generate.py b/assets/scripts/generate.py
index 08c8cc38f7..2bbbc61fd2 100644
--- a/assets/scripts/generate.py
+++ b/assets/scripts/generate.py
@@ -59,7 +59,7 @@ def format_difficulty(difficulty: str, show_emoji: bool = False):
emoji = "🟢"
font = "Esay"
if show_emoji:
- return emoji + " " + font
+ return emoji + " " + font
return font
# 格式化每一个frame items
@@ -357,8 +357,9 @@ def gen_tag_and_difficulty(problem_path):
labels = (df.loc[df_indexs[0], "标签"]).split("、")
for label in labels:
problem_label += " [`" + label + "`](../solution/" + label + ".md)"
- problem_label += "\n"
- problem_difficulty = format_difficulty(df.loc[df_indexs[0], "难度"], True)
+ problem_label += "\n\n"
+ problem_difficulty = format_difficulty(
+ df.loc[df_indexs[0], "难度"], True)
delim = "### 题目\n"
file_path = os.path.join(problem_path, Path(file))
@@ -370,7 +371,7 @@ def gen_tag_and_difficulty(problem_path):
continue
if "Esay" in content:
continue
-
+
content, after = content.split(delim)
content += problem_difficulty + problem_label + delim + after
Path(file_path).write_text(content, encoding='utf-8')
diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js
index a7f91b85a5..6c7cc14336 100644
--- a/docs/.vuepress/config.js
+++ b/docs/.vuepress/config.js
@@ -102,7 +102,8 @@ module.exports = {
"/leetcode/problem/0070.md",
"/leetcode/problem/0073.md",
"/leetcode/problem/0076.md",
- "/leetcode/problem/0080.md"
+ "/leetcode/problem/0080.md",
+ "/leetcode/problem/0092.md"
],
},
{
@@ -112,6 +113,7 @@ module.exports = {
"/leetcode/solution/0100-0199.md",
"/leetcode/problem/0120.md",
"/leetcode/problem/0125.md",
+ "/leetcode/problem/0143.md",
"/leetcode/problem/0152.md",
"/leetcode/problem/0167.md",
"/leetcode/problem/0189.md",
@@ -126,6 +128,7 @@ module.exports = {
"/leetcode/problem/0206.md",
"/leetcode/problem/0224.md",
"/leetcode/problem/0227.md",
+ "/leetcode/problem/0234.md",
"/leetcode/problem/0238.md",
"/leetcode/problem/0259.md",
"/leetcode/problem/0279.md",
diff --git a/docs/.vuepress/public/images/leetcode-js-logo.png b/docs/.vuepress/public/images/leetcode-js-logo.png
index 838c748f2ac4228ec0480e1b1f08e762c9d36877..9f8852b0666b9d05f44dfe66d8f697be8097ddda 100644
GIT binary patch
literal 254591
zcmeFZbyQr-x-Z%Uf&_PW3r+~`gb;!UcWo@tKyY^p?ry ?d#pA8UbMrR7d9|*My|=VuNM{ujb-BLw%7rZSBM*l=Oi#g<6|O&O(NGf92vjwE
z7vBVVVSY3UJ&BU`;9mEWRn4z?2J~Y7GJhm@w7SuIh&t=M)k%ju1MuX6$}jwv+SYu}
z#5)-f*TcC#{zuuAbzAnN8NGT29JgjZ17-+Vm?GkM&Yd4p_!gc4t#>a5u$pOeRsR!|
z;~nEOV2Q_6OX*3v-v3c@>KU+FrxKuL-N!%TW+(f{3;d^L`!WE3ARWCgKtX~=ZH>qY
zxa_>0?tU50tsgGn7_V-W;BFr-V87yiy`pUoalh_#yk@}u@!%=PggSPQ>1I(;U74Y<
zh^=Jj!(rFSsXefP92ENQsFodi&g=`s^e2`=Kbi4+u5go)0yan8?_b#{iBJ!Om^7QM
zS}io_H%D0l=6Omr-4oHzIc
zUC!(OWsJWCuh%)%D@Q!UWd^YbRsf$#ga&`rTGG%}C{vc7!8I*ZFE-%yt&EAiMO0d^
zB`mw|tHhCR7g-lXY1(gXiq*=ED7!l@J9}{1-U`mNsQxgVJgw7XKuorhX3I+zy71wL
z;Qet~h{;=MbT4QR0Y}IR!`rL}m*evC)BRS^c5PADa;reIe)d7rhvVwhd%hXd^s+fZ
z4m)_J{XLZQ^p2Do`=>*$HS_FWWg@V$)wGI1@yM%tU*a#M*HEvu8EdPb0gNR2Co2g9
z_9YiqDaJ(}
npj^r2D
zGW$@Eh|@0|33H^dj+=*JOq6tq^IAW`X+2!P7Di->M+SvzfKhal(Or%aZS~_s*Rs1k
zV`K-_x;}rs{-qHSPqZM02}I3^U)yLg@gPN^$->;TGkn{5*YWDH#b`-0^vz0&@}db4
z)IiW5KkYwAktaOVpect|4w;+F)5$1YLpP1-PDdRa^3oRe3{DfN?z|