This commit is contained in:
krahets 2024-12-04 23:55:42 +08:00
parent 4c422f56cf
commit b3beeb6dd2
24 changed files with 407 additions and 359 deletions

View file

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View file

@ -5894,7 +5894,7 @@ O(1) < O(\log n) < O(n) < O(n \log n) < O(n^2) < O(2^n) < O(n!
</details>
<h3 id="4-o2n">4. &nbsp; 指数阶 <span class="arithmatex">\(O(2^n)\)</span><a class="headerlink" href="#4-o2n" title="Permanent link">&para;</a></h3>
<p>生物学的“细胞分裂”是指数阶增长的典型例子:初始状态为 <span class="arithmatex">\(1\)</span> 个细胞,分裂一轮后变为 <span class="arithmatex">\(2\)</span> 个,分裂两轮后变为 <span class="arithmatex">\(4\)</span> 个,以此类推,分裂 <span class="arithmatex">\(n\)</span> 轮后有 <span class="arithmatex">\(2^n\)</span> 个细胞。</p>
<p>图 2-11 和以下代码模拟了细胞分裂的过程,时间复杂度为 <span class="arithmatex">\(O(2^n)\)</span> </p>
<p>图 2-11 和以下代码模拟了细胞分裂的过程,时间复杂度为 <span class="arithmatex">\(O(2^n)\)</span> 。请注意,输入 <span class="arithmatex">\(n\)</span> 表示分裂轮数,返回值 <code>count</code> 表示总分裂次数。</p>
<div class="tabbed-set tabbed-alternate" data-tabs="10:14"><input checked="checked" id="__tabbed_10_1" name="__tabbed_10" type="radio" /><input id="__tabbed_10_2" name="__tabbed_10" type="radio" /><input id="__tabbed_10_3" name="__tabbed_10" type="radio" /><input id="__tabbed_10_4" name="__tabbed_10" type="radio" /><input id="__tabbed_10_5" name="__tabbed_10" type="radio" /><input id="__tabbed_10_6" name="__tabbed_10" type="radio" /><input id="__tabbed_10_7" name="__tabbed_10" type="radio" /><input id="__tabbed_10_8" name="__tabbed_10" type="radio" /><input id="__tabbed_10_9" name="__tabbed_10" type="radio" /><input id="__tabbed_10_10" name="__tabbed_10" type="radio" /><input id="__tabbed_10_11" name="__tabbed_10" type="radio" /><input id="__tabbed_10_12" name="__tabbed_10" type="radio" /><input id="__tabbed_10_13" name="__tabbed_10" type="radio" /><input id="__tabbed_10_14" name="__tabbed_10" type="radio" /><div class="tabbed-labels"><label for="__tabbed_10_1">Python</label><label for="__tabbed_10_2">C++</label><label for="__tabbed_10_3">Java</label><label for="__tabbed_10_4">C#</label><label for="__tabbed_10_5">Go</label><label for="__tabbed_10_6">Swift</label><label for="__tabbed_10_7">JS</label><label for="__tabbed_10_8">TS</label><label for="__tabbed_10_9">Dart</label><label for="__tabbed_10_10">Rust</label><label for="__tabbed_10_11">C</label><label for="__tabbed_10_12">Kotlin</label><label for="__tabbed_10_13">Ruby</label><label for="__tabbed_10_14">Zig</label></div>
<div class="tabbed-content">
<div class="tabbed-block">

View file

@ -3699,8 +3699,8 @@
<p align="center"> 图 0-1 &nbsp; 本书主要内容 </p>
<h2 id="013">0.1.3 &nbsp; 致谢<a class="headerlink" href="#013" title="Permanent link">&para;</a></h2>
<p>本书在开源社区众多贡献者的共同努力下不断完善。感谢每一位投入时间与精力的撰稿人,他们是(按照 GitHub 自动生成的顺序krahets、Gonglja、nuomi1、codingonion、Reanon、justin-tse、hpstory、danielsss、curtishd、night-cruise、S-N-O-R-L-A-X、msk397、gvenusleo、RiverTwilight、gyt95、zhuoqinyue、Zuoxun、mingXta、hello-ikun、khoaxuantu、FangYuan33、GN-Yu、longsizhuo、mgisr、Cathay-Chen、guowei-gong、xBLACKICEx、K3v123、IsChristina、JoseHung、qualifier1024、pengchzn、Guanngxu、QiLOL、L-Super、WSL0809、Slone123c、lhxsm、yuan0221、what-is-me、rongyi、JeffersonHuang、longranger2、theNefelibatas、yuelinxin、xiongsp、nanlei、a16su、cy-by-side、gaofer、malone6、Wonderdch、hongyun-robot、XiaChuerwu、yd-j、bluebean-cloud、iron-irax、he-weilai、Nigh、MolDuM、Phoenix0415、XC-Zero、SamJin98、reeswell、NI-SW、Horbin-Magician、xjr7670、YangXuanyi、DullSword、iStig、qq909244296、jiaxianhua、wenjianmin、keshida、kilikilikid、lclc6、lwbaptx、luluxia、boloboloda、hts0000、gledfish、fbigm、echo1937、szu17dmy、dshlstarr、coderlef、czruby、beintentional、KeiichiKasai、xb534、ElaBosak233、baagod、zhouLion、yishangzhang、yi427、yabo083、weibk、wangwang105、th1nk3r-ing、tao363、4yDX3906、syd168、siqyka、selear、sdshaoda、noobcodemaker、chadyi、lyl625760、lucaswangdev、liuxjerry、0130w、shanghai-Jerry、JackYang-hellobobo、Javesun99、lipusheng、ShiMaRing、FreddieLi、FloranceYeh、Transmigration-zhou、fanchenggang、gltianwen、Dr-XYZ、curly210102、CuB3y0nd、youshaoXG、bubble9um、fanenr、52coder、foursevenlove、KorsChen、ZongYangL、hezhizhen、linzeyan、ZJKung、GaochaoZhu、yang-le、Evilrabbit520、Turing-1024-Lee、Suremotoo、Allen-Scai、Richard-Zhang1019、qingpeng9802、primexiao、nidhoggfgg、1ch0、MwumLi、ZnYang2018、hugtyftg、logan-qiu、psychelzh 和 Keynman</p>
<p>本书的代码审阅工作由 codingonion、curtishd、Gonglja、gvenusleo、hpstory、justin-tse、khoaxuantu、krahets、night-cruise、nuomi1 和 Reanon 完成(按照首字母顺序排列)。感谢他们付出的时间与精力,正是他们确保了各语言代码的规范与统一。</p>
<p>本书在开源社区众多贡献者的共同努力下不断完善。感谢每一位投入时间与精力的撰稿人,他们是(按照 GitHub 自动生成的顺序krahets、coderonion、Gonglja、nuomi1、Reanon、justin-tse、hpstory、danielsss、curtishd、night-cruise、S-N-O-R-L-A-X、msk397、gvenusleo、khoaxuantu、RiverTwilight、rongyi、gyt95、zhuoqinyue、K3v123、Zuoxun、mingXta、hello-ikun、FangYuan33、GN-Yu、yuelinxin、longsizhuo、Cathay-Chen、guowei-gong、xBLACKICEx、IsChristina、JoseHung、qualifier1024、QiLOL、pengchzn、Guanngxu、L-Super、WSL0809、Slone123c、lhxsm、yuan0221、what-is-me、theNefelibatas、longranger2、cy-by-side、xiongsp、JeffersonHuang、Transmigration-zhou、magentaqin、Wonderdch、malone6、xiaomiusa87、gaofer、bluebean-cloud、a16su、Shyam-Chen、nanlei、hongyun-robot、Phoenix0415、MolDuM、Nigh、he-weilai、junminhong、mgisr、iron-irax、yd-j、XiaChuerwu、XC-Zero、seven1240、SamJin98、wodray、reeswell、NI-SW、Horbin-Magician、Enlightenus、xjr7670、YangXuanyi、DullSword、boloboloda、iStig、qq909244296、jiaxianhua、wenjianmin、keshida、kilikilikid、lclc6、lwbaptx、liuxjerry、lucaswangdev、lyl625760、hts0000、gledfish、fbigm、echo1937、szu17dmy、dshlstarr、Yucao-cy、coderlef、czruby、bongbongbakudan、beintentional、ZongYangL、ZhongYuuu、luluxia、xb534、bitsmi、ElaBosak233、baagod、zhouLion、yishangzhang、yi427、yabo083、weibk、wangwang105、th1nk3r-ing、tao363、4yDX3906、syd168、steventimes、sslmj2020、smilelsb、siqyka、selear、sdshaoda、Xi-Row、popozhu、nuquist19、noobcodemaker、XiaoK29、chadyi、ZhongGuanbin、shanghai-Jerry、JackYang-hellobobo、Javesun99、lipusheng、BlindTerran、ShiMaRing、FreddieLi、FloranceYeh、iFleey、fanchenggang、gltianwen、goerll、Dr-XYZ、nedchu、curly210102、CuB3y0nd、KraHsu、CarrotDLaw、youshaoXG、bubble9um、fanenr、eagleanurag、LifeGoesOnionOnionOnion、52coder、foursevenlove、KorsChen、hezhizhen、linzeyan、ZJKung、GaochaoZhu、hopkings2008、yang-le、Evilrabbit520、Turing-1024-Lee、thomasq0、Suremotoo、Allen-Scai、Risuntsy、Richard-Zhang1019、qingpeng9802、primexiao、nidhoggfgg、1ch0、MwumLi、martinx、ZnYang2018、hugtyftg、logan-qiu、psychelzh、Keynman、KeiichiKasai、0130w</p>
<p>本书的代码审阅工作由 coderonion、curtishd、Gonglja、gvenusleo、hpstory、justin-tse、khoaxuantu、krahets、night-cruise、nuomi1、Reanon 和 rongyi 完成(按照首字母顺序排列)。感谢他们付出的时间与精力,正是他们确保了各语言代码的规范与统一。</p>
<p>在本书的创作过程中,我得到了许多人的帮助。</p>
<ul>
<li>感谢我在公司的导师李汐博士,在一次畅谈中你鼓励我“快行动起来”,坚定了我写这本书的决心;</li>

View file

@ -7210,6 +7210,18 @@
<a id="__codelineno-38-102" name="__codelineno-38-102" href="#__codelineno-38-102"></a><span class="w"> </span><span class="n">deque</span><span class="o">-&gt;</span><span class="n">queSize</span><span class="o">--</span><span class="p">;</span>
<a id="__codelineno-38-103" name="__codelineno-38-103" href="#__codelineno-38-103"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">num</span><span class="p">;</span>
<a id="__codelineno-38-104" name="__codelineno-38-104" href="#__codelineno-38-104"></a><span class="p">}</span>
<a id="__codelineno-38-105" name="__codelineno-38-105" href="#__codelineno-38-105"></a>
<a id="__codelineno-38-106" name="__codelineno-38-106" href="#__codelineno-38-106"></a><span class="cm">/* 返回数组用于打印 */</span>
<a id="__codelineno-38-107" name="__codelineno-38-107" href="#__codelineno-38-107"></a><span class="kt">int</span><span class="w"> </span><span class="o">*</span><span class="nf">toArray</span><span class="p">(</span><span class="n">ArrayDeque</span><span class="w"> </span><span class="o">*</span><span class="n">deque</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="o">*</span><span class="n">queSize</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="__codelineno-38-108" name="__codelineno-38-108" href="#__codelineno-38-108"></a><span class="w"> </span><span class="o">*</span><span class="n">queSize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">deque</span><span class="o">-&gt;</span><span class="n">queSize</span><span class="p">;</span>
<a id="__codelineno-38-109" name="__codelineno-38-109" href="#__codelineno-38-109"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="o">*</span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">calloc</span><span class="p">(</span><span class="n">deque</span><span class="o">-&gt;</span><span class="n">queSize</span><span class="p">,</span><span class="w"> </span><span class="k">sizeof</span><span class="p">(</span><span class="kt">int</span><span class="p">));</span>
<a id="__codelineno-38-110" name="__codelineno-38-110" href="#__codelineno-38-110"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">j</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">deque</span><span class="o">-&gt;</span><span class="n">front</span><span class="p">;</span>
<a id="__codelineno-38-111" name="__codelineno-38-111" href="#__codelineno-38-111"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="n">deque</span><span class="o">-&gt;</span><span class="n">queSize</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="__codelineno-38-112" name="__codelineno-38-112" href="#__codelineno-38-112"></a><span class="w"> </span><span class="n">res</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">deque</span><span class="o">-&gt;</span><span class="n">nums</span><span class="p">[</span><span class="n">j</span><span class="w"> </span><span class="o">%</span><span class="w"> </span><span class="n">deque</span><span class="o">-&gt;</span><span class="n">queCapacity</span><span class="p">];</span>
<a id="__codelineno-38-113" name="__codelineno-38-113" href="#__codelineno-38-113"></a><span class="w"> </span><span class="n">j</span><span class="o">++</span><span class="p">;</span>
<a id="__codelineno-38-114" name="__codelineno-38-114" href="#__codelineno-38-114"></a><span class="w"> </span><span class="p">}</span>
<a id="__codelineno-38-115" name="__codelineno-38-115" href="#__codelineno-38-115"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">res</span><span class="p">;</span>
<a id="__codelineno-38-116" name="__codelineno-38-116" href="#__codelineno-38-116"></a><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">

View file

@ -5883,6 +5883,18 @@
<a id="__codelineno-38-65" name="__codelineno-38-65" href="#__codelineno-38-65"></a><span class="w"> </span><span class="n">queue</span><span class="o">-&gt;</span><span class="n">queSize</span><span class="o">--</span><span class="p">;</span>
<a id="__codelineno-38-66" name="__codelineno-38-66" href="#__codelineno-38-66"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">num</span><span class="p">;</span>
<a id="__codelineno-38-67" name="__codelineno-38-67" href="#__codelineno-38-67"></a><span class="p">}</span>
<a id="__codelineno-38-68" name="__codelineno-38-68" href="#__codelineno-38-68"></a>
<a id="__codelineno-38-69" name="__codelineno-38-69" href="#__codelineno-38-69"></a><span class="cm">/* 返回数组用于打印 */</span>
<a id="__codelineno-38-70" name="__codelineno-38-70" href="#__codelineno-38-70"></a><span class="kt">int</span><span class="w"> </span><span class="o">*</span><span class="nf">toArray</span><span class="p">(</span><span class="n">ArrayQueue</span><span class="w"> </span><span class="o">*</span><span class="n">queue</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="o">*</span><span class="n">queSize</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="__codelineno-38-71" name="__codelineno-38-71" href="#__codelineno-38-71"></a><span class="w"> </span><span class="o">*</span><span class="n">queSize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">queue</span><span class="o">-&gt;</span><span class="n">queSize</span><span class="p">;</span>
<a id="__codelineno-38-72" name="__codelineno-38-72" href="#__codelineno-38-72"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="o">*</span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">calloc</span><span class="p">(</span><span class="n">queue</span><span class="o">-&gt;</span><span class="n">queSize</span><span class="p">,</span><span class="w"> </span><span class="k">sizeof</span><span class="p">(</span><span class="kt">int</span><span class="p">));</span>
<a id="__codelineno-38-73" name="__codelineno-38-73" href="#__codelineno-38-73"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">j</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">queue</span><span class="o">-&gt;</span><span class="n">front</span><span class="p">;</span>
<a id="__codelineno-38-74" name="__codelineno-38-74" href="#__codelineno-38-74"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="n">queue</span><span class="o">-&gt;</span><span class="n">queSize</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="__codelineno-38-75" name="__codelineno-38-75" href="#__codelineno-38-75"></a><span class="w"> </span><span class="n">res</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">queue</span><span class="o">-&gt;</span><span class="n">nums</span><span class="p">[</span><span class="n">j</span><span class="w"> </span><span class="o">%</span><span class="w"> </span><span class="n">queue</span><span class="o">-&gt;</span><span class="n">queCapacity</span><span class="p">];</span>
<a id="__codelineno-38-76" name="__codelineno-38-76" href="#__codelineno-38-76"></a><span class="w"> </span><span class="n">j</span><span class="o">++</span><span class="p">;</span>
<a id="__codelineno-38-77" name="__codelineno-38-77" href="#__codelineno-38-77"></a><span class="w"> </span><span class="p">}</span>
<a id="__codelineno-38-78" name="__codelineno-38-78" href="#__codelineno-38-78"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">res</span><span class="p">;</span>
<a id="__codelineno-38-79" name="__codelineno-38-79" href="#__codelineno-38-79"></a><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">

View file

@ -3634,8 +3634,8 @@
<p align="center"> Figure 0-1 &nbsp; Main content of the book </p>
<h2 id="013-acknowledgements">0.1.3 &nbsp; Acknowledgements<a class="headerlink" href="#013-acknowledgements" title="Permanent link">&para;</a></h2>
<p>This book is continuously improved with the joint efforts of many contributors from the open-source community. Thanks to each writer who invested their time and energy, listed in the order generated by GitHub: krahets, codingonion, nuomi1, Gonglja, Reanon, justin-tse, danielsss, hpstory, S-N-O-R-L-A-X, night-cruise, msk397, gvenusleo, RiverTwilight, gyt95, zhuoqinyue, Zuoxun, Xia-Sang, mingXta, FangYuan33, GN-Yu, IsChristina, xBLACKICEx, guowei-gong, Cathay-Chen, mgisr, JoseHung, qualifier1024, pengchzn, Guanngxu, longsizhuo, L-Super, what-is-me, yuan0221, lhxsm, Slone123c, WSL0809, longranger2, theNefelibatas, xiongsp, JeffersonHuang, hongyun-robot, K3v123, yuelinxin, a16su, gaofer, malone6, Wonderdch, xjr7670, DullSword, Horbin-Magician, NI-SW, reeswell, XC-Zero, XiaChuerwu, yd-j, iron-irax, huawuque404, MolDuM, Nigh, KorsChen, foursevenlove, 52coder, bubble9um, youshaoXG, curly210102, gltianwen, fanchenggang, Transmigration-zhou, FloranceYeh, FreddieLi, ShiMaRing, lipusheng, Javesun99, JackYang-hellobobo, shanghai-Jerry, 0130w, Keynman, psychelzh, logan-qiu, ZnYang2018, MwumLi, 1ch0, Phoenix0415, qingpeng9802, Richard-Zhang1019, QiLOL, Suremotoo, Turing-1024-Lee, Evilrabbit520, GaochaoZhu, ZJKung, linzeyan, hezhizhen, ZongYangL, beintentional, czruby, coderlef, dshlstarr, szu17dmy, fbigm, gledfish, hts0000, boloboloda, iStig, jiaxianhua, wenjianmin, keshida, kilikilikid, lclc6, lwbaptx, liuxjerry, lucaswangdev, lyl625760, chadyi, noobcodemaker, selear, siqyka, syd168, 4yDX3906, tao363, wangwang105, weibk, yabo083, yi427, yishangzhang, zhouLion, baagod, ElaBosak233, xb534, luluxia, yanedie, thomasq0, YangXuanyi and th1nk3r-ing.</p>
<p>The code review work for this book was completed by codingonion, Gonglja, gvenusleo, hpstory, justintse, khoaxuantu, krahets, night-cruise, nuomi1, and Reanon (listed in alphabetical order). Thanks to them for their time and effort, ensuring the standardization and uniformity of the code in various languages.</p>
<p>This book is continuously improved with the joint efforts of many contributors from the open-source community. Thanks to each writer who invested their time and energy, listed in the order generated by GitHub: krahets, coderonion, Gonglja, nuomi1, Reanon, justin-tse, hpstory, danielsss, curtishd, night-cruise, S-N-O-R-L-A-X, msk397, gvenusleo, khoaxuantu, RiverTwilight, rongyi, gyt95, zhuoqinyue, K3v123, Zuoxun, mingXta, hello-ikun, FangYuan33, GN-Yu, yuelinxin, longsizhuo, Cathay-Chen, guowei-gong, xBLACKICEx, IsChristina, JoseHung, qualifier1024, QiLOL, pengchzn, Guanngxu, L-Super, WSL0809, Slone123c, lhxsm, yuan0221, what-is-me, theNefelibatas, longranger2, cy-by-side, xiongsp, JeffersonHuang, Transmigration-zhou, magentaqin, Wonderdch, malone6, xiaomiusa87, gaofer, bluebean-cloud, a16su, Shyam-Chen, nanlei, hongyun-robot, Phoenix0415, MolDuM, Nigh, he-weilai, junminhong, mgisr, iron-irax, yd-j, XiaChuerwu, XC-Zero, seven1240, SamJin98, wodray, reeswell, NI-SW, Horbin-Magician, Enlightenus, xjr7670, YangXuanyi, DullSword, boloboloda, iStig, qq909244296, jiaxianhua, wenjianmin, keshida, kilikilikid, lclc6, lwbaptx, liuxjerry, lucaswangdev, lyl625760, hts0000, gledfish, fbigm, echo1937, szu17dmy, dshlstarr, Yucao-cy, coderlef, czruby, bongbongbakudan, beintentional, ZongYangL, ZhongYuuu, luluxia, xb534, bitsmi, ElaBosak233, baagod, zhouLion, yishangzhang, yi427, yabo083, weibk, wangwang105, th1nk3r-ing, tao363, 4yDX3906, syd168, steventimes, sslmj2020, smilelsb, siqyka, selear, sdshaoda, Xi-Row, popozhu, nuquist19, noobcodemaker, XiaoK29, chadyi, ZhongGuanbin, shanghai-Jerry, JackYang-hellobobo, Javesun99, lipusheng, BlindTerran, ShiMaRing, FreddieLi, FloranceYeh, iFleey, fanchenggang, gltianwen, goerll, Dr-XYZ, nedchu, curly210102, CuB3y0nd, KraHsu, CarrotDLaw, youshaoXG, bubble9um, fanenr, eagleanurag, LifeGoesOnionOnionOnion, 52coder, foursevenlove, KorsChen, hezhizhen, linzeyan, ZJKung, GaochaoZhu, hopkings2008, yang-le, Evilrabbit520, Turing-1024-Lee, thomasq0, Suremotoo, Allen-Scai, Risuntsy, Richard-Zhang1019, qingpeng9802, primexiao, nidhoggfgg, 1ch0, MwumLi, martinx, ZnYang2018, hugtyftg, logan-qiu, psychelzh, Keynman, KeiichiKasai and 0130w.</p>
<p>The code review work for this book was completed by coderonion, Gonglja, gvenusleo, hpstory, justintse, khoaxuantu, krahets, night-cruise, nuomi1, Reanon and rongyi (listed in alphabetical order). Thanks to them for their time and effort, ensuring the standardization and uniformity of the code in various languages.</p>
<p>Throughout the creation of this book, numerous individuals provided invaluable assistance, including but not limited to:</p>
<ul>
<li>Thanks to my mentor at the company, Dr. Xi Li, who encouraged me in a conversation to "get moving fast," which solidified my determination to write this book;</li>

View file

@ -3591,26 +3591,26 @@
<!-- Page content -->
<h1 id="101-binary-search">10.1 &nbsp; Binary search<a class="headerlink" href="#101-binary-search" title="Permanent link">&para;</a></h1>
<p><u>Binary search</u> is an efficient search algorithm based on the divide-and-conquer strategy. It utilizes the orderliness of data, reducing the search range by half each round until the target element is found or the search interval is empty.</p>
<p><u>Binary search</u> is an efficient search algorithm that uses a divide-and-conquer strategy. It takes advantage of the sorted order of elements in an array by reducing the search interval by half in each iteration, continuing until either the target element is found or the search interval becomes empty.</p>
<div class="admonition question">
<p class="admonition-title">Question</p>
<p>Given an array <code>nums</code> of length <span class="arithmatex">\(n\)</span>, with elements arranged in ascending order and non-repeating. Please find and return the index of element <code>target</code> in this array. If the array does not contain the element, return <span class="arithmatex">\(-1\)</span>. An example is shown in Figure 10-1.</p>
<p>Given an array <code>nums</code> of length <span class="arithmatex">\(n\)</span>, where elements are arranged in ascending order without duplicates. Please find and return the index of element <code>target</code> in this array. If the array does not contain the element, return <span class="arithmatex">\(-1\)</span>. An example is shown in Figure 10-1.</p>
</div>
<p><a class="glightbox" href="../binary_search.assets/binary_search_example.png" data-type="image" data-width="100%" data-height="auto" data-desc-position="bottom"><img alt="Binary search example data" class="animation-figure" src="../binary_search.assets/binary_search_example.png" /></a></p>
<p align="center"> Figure 10-1 &nbsp; Binary search example data </p>
<p>As shown in Figure 10-2, we first initialize pointers <span class="arithmatex">\(i = 0\)</span> and <span class="arithmatex">\(j = n - 1\)</span>, pointing to the first and last elements of the array, representing the search interval <span class="arithmatex">\([0, n - 1]\)</span>. Please note that square brackets indicate a closed interval, which includes the boundary values themselves.</p>
<p>Next, perform the following two steps in a loop.</p>
<p>As shown in Figure 10-2, we firstly initialize pointers with <span class="arithmatex">\(i = 0\)</span> and <span class="arithmatex">\(j = n - 1\)</span>, pointing to the first and last element of the array respectively. They also represent the whole search interval <span class="arithmatex">\([0, n - 1]\)</span>. Please note that square brackets indicate a closed interval, which includes the boundary values themselves.</p>
<p>And then the following two steps may be performed in a loop.</p>
<ol>
<li>Calculate the midpoint index <span class="arithmatex">\(m = \lfloor {(i + j) / 2} \rfloor\)</span>, where <span class="arithmatex">\(\lfloor \: \rfloor\)</span> denotes the floor operation.</li>
<li>Compare the size of <code>nums[m]</code> and <code>target</code>, divided into the following three scenarios.<ol>
<li>Based on the comparison between the value of <code>nums[m]</code> and <code>target</code>, one of the following three cases will be chosen to execute.<ol>
<li>If <code>nums[m] &lt; target</code>, it indicates that <code>target</code> is in the interval <span class="arithmatex">\([m + 1, j]\)</span>, thus set <span class="arithmatex">\(i = m + 1\)</span>.</li>
<li>If <code>nums[m] &gt; target</code>, it indicates that <code>target</code> is in the interval <span class="arithmatex">\([i, m - 1]\)</span>, thus set <span class="arithmatex">\(j = m - 1\)</span>.</li>
<li>If <code>nums[m] = target</code>, it indicates that <code>target</code> is found, thus return index <span class="arithmatex">\(m\)</span>.</li>
</ol>
</li>
</ol>
<p>If the array does not contain the target element, the search interval will eventually reduce to empty. In this case, return <span class="arithmatex">\(-1\)</span>.</p>
<p>If the array does not contain the target element, the search interval will eventually reduce to empty, ending up returning <span class="arithmatex">\(-1\)</span>.</p>
<div class="tabbed-set tabbed-alternate" data-tabs="1:7"><input checked="checked" id="__tabbed_1_1" name="__tabbed_1" type="radio" /><input id="__tabbed_1_2" name="__tabbed_1" type="radio" /><input id="__tabbed_1_3" name="__tabbed_1" type="radio" /><input id="__tabbed_1_4" name="__tabbed_1" type="radio" /><input id="__tabbed_1_5" name="__tabbed_1" type="radio" /><input id="__tabbed_1_6" name="__tabbed_1" type="radio" /><input id="__tabbed_1_7" name="__tabbed_1" type="radio" /><div class="tabbed-labels"><label for="__tabbed_1_1">&lt;1&gt;</label><label for="__tabbed_1_2">&lt;2&gt;</label><label for="__tabbed_1_3">&lt;3&gt;</label><label for="__tabbed_1_4">&lt;4&gt;</label><label for="__tabbed_1_5">&lt;5&gt;</label><label for="__tabbed_1_6">&lt;6&gt;</label><label for="__tabbed_1_7">&lt;7&gt;</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
@ -3638,7 +3638,7 @@
</div>
<p align="center"> Figure 10-2 &nbsp; Binary search process </p>
<p>It's worth noting that since <span class="arithmatex">\(i\)</span> and <span class="arithmatex">\(j\)</span> are both of type <code>int</code>, <strong><span class="arithmatex">\(i + j\)</span> might exceed the range of <code>int</code> type</strong>. To avoid large number overflow, we usually use the formula <span class="arithmatex">\(m = \lfloor {i + (j - i) / 2} \rfloor\)</span> to calculate the midpoint.</p>
<p>It's worth noting that as <span class="arithmatex">\(i\)</span> and <span class="arithmatex">\(j\)</span> are both of type <code>int</code>, <strong><span class="arithmatex">\(i + j\)</span> might exceed the range of <code>int</code> type</strong>. To avoid large number overflow, we usually use the formula <span class="arithmatex">\(m = \lfloor {i + (j - i) / 2} \rfloor\)</span> to calculate the midpoint.</p>
<p>The code is as follows:</p>
<div class="tabbed-set tabbed-alternate" data-tabs="2:14"><input checked="checked" id="__tabbed_2_1" name="__tabbed_2" type="radio" /><input id="__tabbed_2_2" name="__tabbed_2" type="radio" /><input id="__tabbed_2_3" name="__tabbed_2" type="radio" /><input id="__tabbed_2_4" name="__tabbed_2" type="radio" /><input id="__tabbed_2_5" name="__tabbed_2" type="radio" /><input id="__tabbed_2_6" name="__tabbed_2" type="radio" /><input id="__tabbed_2_7" name="__tabbed_2" type="radio" /><input id="__tabbed_2_8" name="__tabbed_2" type="radio" /><input id="__tabbed_2_9" name="__tabbed_2" type="radio" /><input id="__tabbed_2_10" name="__tabbed_2" type="radio" /><input id="__tabbed_2_11" name="__tabbed_2" type="radio" /><input id="__tabbed_2_12" name="__tabbed_2" type="radio" /><input id="__tabbed_2_13" name="__tabbed_2" type="radio" /><input id="__tabbed_2_14" name="__tabbed_2" type="radio" /><div class="tabbed-labels"><label for="__tabbed_2_1">Python</label><label for="__tabbed_2_2">C++</label><label for="__tabbed_2_3">Java</label><label for="__tabbed_2_4">C#</label><label for="__tabbed_2_5">Go</label><label for="__tabbed_2_6">Swift</label><label for="__tabbed_2_7">JS</label><label for="__tabbed_2_8">TS</label><label for="__tabbed_2_9">Dart</label><label for="__tabbed_2_10">Rust</label><label for="__tabbed_2_11">C</label><label for="__tabbed_2_12">Kotlin</label><label for="__tabbed_2_13">Ruby</label><label for="__tabbed_2_14">Zig</label></div>
<div class="tabbed-content">
@ -3746,10 +3746,10 @@
</div>
</div>
</div>
<p><strong>Time complexity is <span class="arithmatex">\(O(\log n)\)</span></strong> : In the binary loop, the interval reduces by half each round, hence the number of iterations is <span class="arithmatex">\(\log_2 n\)</span>.</p>
<p><strong>Space complexity is <span class="arithmatex">\(O(1)\)</span></strong> : Pointers <span class="arithmatex">\(i\)</span> and <span class="arithmatex">\(j\)</span> use constant size space.</p>
<p><strong>Time complexity is <span class="arithmatex">\(O(\log n)\)</span></strong> : In the binary loop, the interval decreases by half each round, hence the number of iterations is <span class="arithmatex">\(\log_2 n\)</span>.</p>
<p><strong>Space complexity is <span class="arithmatex">\(O(1)\)</span></strong> : Pointers <span class="arithmatex">\(i\)</span> and <span class="arithmatex">\(j\)</span> occupies constant size of space.</p>
<h2 id="1011-interval-representation-methods">10.1.1 &nbsp; Interval representation methods<a class="headerlink" href="#1011-interval-representation-methods" title="Permanent link">&para;</a></h2>
<p>Besides the aforementioned closed interval, a common interval representation is the "left-closed right-open" interval, defined as <span class="arithmatex">\([0, n)\)</span>, where the left boundary includes itself, and the right boundary does not include itself. In this representation, the interval <span class="arithmatex">\([i, j)\)</span> is empty when <span class="arithmatex">\(i = j\)</span>.</p>
<p>Besides the above closed interval, another common interval representation is the "left-closed right-open" interval, defined as <span class="arithmatex">\([0, n)\)</span>, where the left boundary includes itself, and the right boundary does not. In this representation, the interval <span class="arithmatex">\([i, j)\)</span> is empty when <span class="arithmatex">\(i = j\)</span>.</p>
<p>We can implement a binary search algorithm with the same functionality based on this representation:</p>
<div class="tabbed-set tabbed-alternate" data-tabs="3:14"><input checked="checked" id="__tabbed_3_1" name="__tabbed_3" type="radio" /><input id="__tabbed_3_2" name="__tabbed_3" type="radio" /><input id="__tabbed_3_3" name="__tabbed_3" type="radio" /><input id="__tabbed_3_4" name="__tabbed_3" type="radio" /><input id="__tabbed_3_5" name="__tabbed_3" type="radio" /><input id="__tabbed_3_6" name="__tabbed_3" type="radio" /><input id="__tabbed_3_7" name="__tabbed_3" type="radio" /><input id="__tabbed_3_8" name="__tabbed_3" type="radio" /><input id="__tabbed_3_9" name="__tabbed_3" type="radio" /><input id="__tabbed_3_10" name="__tabbed_3" type="radio" /><input id="__tabbed_3_11" name="__tabbed_3" type="radio" /><input id="__tabbed_3_12" name="__tabbed_3" type="radio" /><input id="__tabbed_3_13" name="__tabbed_3" type="radio" /><input id="__tabbed_3_14" name="__tabbed_3" type="radio" /><div class="tabbed-labels"><label for="__tabbed_3_1">Python</label><label for="__tabbed_3_2">C++</label><label for="__tabbed_3_3">Java</label><label for="__tabbed_3_4">C#</label><label for="__tabbed_3_5">Go</label><label for="__tabbed_3_6">Swift</label><label for="__tabbed_3_7">JS</label><label for="__tabbed_3_8">TS</label><label for="__tabbed_3_9">Dart</label><label for="__tabbed_3_10">Rust</label><label for="__tabbed_3_11">C</label><label for="__tabbed_3_12">Kotlin</label><label for="__tabbed_3_13">Ruby</label><label for="__tabbed_3_14">Zig</label></div>
<div class="tabbed-content">
@ -3856,22 +3856,22 @@
</div>
</div>
</div>
<p>As shown in Figure 10-3, in the two types of interval representations, the initialization of the binary search algorithm, the loop condition, and the narrowing interval operation are different.</p>
<p>Since both boundaries in the "closed interval" representation are defined as closed, the operations to narrow the interval through pointers <span class="arithmatex">\(i\)</span> and <span class="arithmatex">\(j\)</span> are also symmetrical. This makes it less prone to errors, <strong>therefore, it is generally recommended to use the "closed interval" approach</strong>.</p>
<p>As shown in Figure 10-3, under the two types of interval representations, the initialization, loop condition, and narrowing interval operation of the binary search algorithm differ.</p>
<p>Since both boundaries in the "closed interval" representation are inclusive, the operations to narrow the interval through pointers <span class="arithmatex">\(i\)</span> and <span class="arithmatex">\(j\)</span> are also symmetrical. This makes it less prone to errors, <strong>therefore, it is generally recommended to use the "closed interval" approach</strong>.</p>
<p><a class="glightbox" href="../binary_search.assets/binary_search_ranges.png" data-type="image" data-width="100%" data-height="auto" data-desc-position="bottom"><img alt="Two types of interval definitions" class="animation-figure" src="../binary_search.assets/binary_search_ranges.png" /></a></p>
<p align="center"> Figure 10-3 &nbsp; Two types of interval definitions </p>
<h2 id="1012-advantages-and-limitations">10.1.2 &nbsp; Advantages and limitations<a class="headerlink" href="#1012-advantages-and-limitations" title="Permanent link">&para;</a></h2>
<p>Binary search performs well in both time and space aspects.</p>
<ul>
<li>Binary search is time-efficient. With large data volumes, the logarithmic time complexity has a significant advantage. For instance, when the data size <span class="arithmatex">\(n = 2^{20}\)</span>, linear search requires <span class="arithmatex">\(2^{20} = 1048576\)</span> iterations, while binary search only requires <span class="arithmatex">\(\log_2 2^{20} = 20\)</span> iterations.</li>
<li>Binary search does not require extra space. Compared to search algorithms that rely on additional space (like hash search), binary search is more space-efficient.</li>
<li>Binary search is time-efficient. With large dataset, the logarithmic time complexity offers a major advantage. For instance, given a dataset with size <span class="arithmatex">\(n = 2^{20}\)</span>, linear search requires <span class="arithmatex">\(2^{20} = 1048576\)</span> iterations, while binary search only demands <span class="arithmatex">\(\log_2 2^{20} = 20\)</span> loops.</li>
<li>Binary search does not need extra space. Compared to search algorithms that rely on additional space (like hash search), binary search is more space-efficient.</li>
</ul>
<p>However, binary search is not suitable for all situations, mainly for the following reasons.</p>
<p>However, binary search may not be suitable for all scenarios due to the following concerns.</p>
<ul>
<li>Binary search is only applicable to ordered data. If the input data is unordered, it is not worth sorting it just to use binary search, as sorting algorithms typically have a time complexity of <span class="arithmatex">\(O(n \log n)\)</span>, which is higher than both linear and binary search. For scenarios with frequent element insertion to maintain array order, inserting elements into specific positions has a time complexity of <span class="arithmatex">\(O(n)\)</span>, which is also quite costly.</li>
<li>Binary search is only applicable to arrays. Binary search requires non-continuous (jumping) element access, which is inefficient in linked lists, thus not suitable for use in linked lists or data structures based on linked lists.</li>
<li>With small data volumes, linear search performs better. In linear search, each round only requires 1 decision operation; whereas in binary search, it involves 1 addition, 1 division, 1 to 3 decision operations, 1 addition (subtraction), totaling 4 to 6 operations; therefore, when data volume <span class="arithmatex">\(n\)</span> is small, linear search can be faster than binary search.</li>
<li>Binary search can only be applied to sorted data. Unsorted data must be sorted before applying binary search, which may not be worthwhile as sorting algorithm typically has a time complexity of <span class="arithmatex">\(O(n \log n)\)</span>. Such cost is even higher than linear search, not to mention binary search itself. For scenarios with frequent insertion, the cost of remaining the array in order is pretty high as the time complexity of inserting new elements into specific positions is <span class="arithmatex">\(O(n)\)</span>.</li>
<li>Binary search may use array only. Binary search requires non-continuous (jumping) element access, which is inefficient in linked list. As a result, linked list or data structures based on linked list may not be suitable for this algorithm.</li>
<li>Linear search performs better on small dataset. In linear search, only 1 decision operation is required for each iteration; whereas in binary search, it involves 1 addition, 1 division, 1 to 3 decision operations, 1 addition (subtraction), totaling 4 to 6 operations. Therefore, if data size <span class="arithmatex">\(n\)</span> is small, linear search is faster than binary search.</li>
</ul>
<!-- Source file information -->

View file

@ -3591,13 +3591,13 @@
<!-- Page content -->
<h1 id="104-hash-optimization-strategies">10.4 &nbsp; Hash optimization strategies<a class="headerlink" href="#104-hash-optimization-strategies" title="Permanent link">&para;</a></h1>
<p>In algorithm problems, <strong>we often reduce the time complexity of algorithms by replacing linear search with hash search</strong>. Let's use an algorithm problem to deepen understanding.</p>
<p>In algorithm problems, <strong>we often reduce the time complexity of an algorithm by replacing a linear search with a hash-based search</strong>. Let's use an algorithm problem to deepen the understanding.</p>
<div class="admonition question">
<p class="admonition-title">Question</p>
<p>Given an integer array <code>nums</code> and a target element <code>target</code>, please search for two elements in the array whose "sum" equals <code>target</code>, and return their array indices. Any solution is acceptable.</p>
</div>
<h2 id="1041-linear-search-trading-time-for-space">10.4.1 &nbsp; Linear search: trading time for space<a class="headerlink" href="#1041-linear-search-trading-time-for-space" title="Permanent link">&para;</a></h2>
<p>Consider traversing all possible combinations directly. As shown in Figure 10-9, we initiate a two-layer loop, and in each round, we determine whether the sum of the two integers equals <code>target</code>. If so, we return their indices.</p>
<p>Consider traversing through all possible combinations directly. As shown in Figure 10-9, we initiate a nested loop, and in each iteration, we determine whether the sum of the two integers equals <code>target</code>. If so, we return their indices.</p>
<p><a class="glightbox" href="../replace_linear_by_hashing.assets/two_sum_brute_force.png" data-type="image" data-width="100%" data-height="auto" data-desc-position="bottom"><img alt="Linear search solution for two-sum problem" class="animation-figure" src="../replace_linear_by_hashing.assets/two_sum_brute_force.png" /></a></p>
<p align="center"> Figure 10-9 &nbsp; Linear search solution for two-sum problem </p>
@ -3691,9 +3691,9 @@
</div>
</div>
</div>
<p>This method has a time complexity of <span class="arithmatex">\(O(n^2)\)</span> and a space complexity of <span class="arithmatex">\(O(1)\)</span>, which is very time-consuming with large data volumes.</p>
<p>This method has a time complexity of <span class="arithmatex">\(O(n^2)\)</span> and a space complexity of <span class="arithmatex">\(O(1)\)</span>, which can be very time-consuming with large data volumes.</p>
<h2 id="1042-hash-search-trading-space-for-time">10.4.2 &nbsp; Hash search: trading space for time<a class="headerlink" href="#1042-hash-search-trading-space-for-time" title="Permanent link">&para;</a></h2>
<p>Consider using a hash table, with key-value pairs being the array elements and their indices, respectively. Loop through the array, performing the steps shown in Figure 10-10 each round.</p>
<p>Consider using a hash table, where the key-value pairs are the array elements and their indices, respectively. Loop through the array, performing the steps shown in Figure 10-10 during each iteration.</p>
<ol>
<li>Check if the number <code>target - nums[i]</code> is in the hash table. If so, directly return the indices of these two elements.</li>
<li>Add the key-value pair <code>nums[i]</code> and index <code>i</code> to the hash table.</li>
@ -3811,7 +3811,7 @@
</div>
</div>
</div>
<p>This method reduces the time complexity from <span class="arithmatex">\(O(n^2)\)</span> to <span class="arithmatex">\(O(n)\)</span> by using hash search, greatly improving the running efficiency.</p>
<p>This method reduces the time complexity from <span class="arithmatex">\(O(n^2)\)</span> to <span class="arithmatex">\(O(n)\)</span> by using hash search, significantly enhancing runtime efficiency.</p>
<p>As it requires maintaining an additional hash table, the space complexity is <span class="arithmatex">\(O(n)\)</span>. <strong>Nevertheless, this method has a more balanced time-space efficiency overall, making it the optimal solution for this problem</strong>.</p>
<!-- Source file information -->

View file

@ -495,11 +495,11 @@
</h3>
<div class="profile-div">
<div class="profile-cell">
<a href="https://github.com/codingonion">
<img alt="Reviewer: codingonion" class="profile-img" src="../assets/avatar/avatar_codingonion.jpg"/>
<a href="https://github.com/coderonion">
<img alt="Reviewer: coderonion" class="profile-img" src="../assets/avatar/avatar_coderonion.jpg"/>
<br/>
<b>
codingonion
coderonion
</b>
<br/>
<sub>

File diff suppressed because one or more lines are too long

View file

@ -2,527 +2,527 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.hello-algo.com/en/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_appendix/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_appendix/contribution/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_appendix/installation/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_appendix/terminology/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_array_and_linkedlist/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_array_and_linkedlist/array/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_array_and_linkedlist/linked_list/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_array_and_linkedlist/list/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_array_and_linkedlist/ram_and_cache/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_array_and_linkedlist/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_backtracking/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_backtracking/backtracking_algorithm/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_backtracking/n_queens_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_backtracking/permutations_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_backtracking/subset_sum_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_backtracking/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_computational_complexity/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_computational_complexity/iteration_and_recursion/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_computational_complexity/performance_evaluation/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_computational_complexity/space_complexity/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_computational_complexity/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_computational_complexity/time_complexity/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_data_structure/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_data_structure/basic_data_types/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_data_structure/character_encoding/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_data_structure/classification_of_data_structure/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_data_structure/number_encoding/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_data_structure/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_divide_and_conquer/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_divide_and_conquer/binary_search_recur/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_divide_and_conquer/build_binary_tree_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_divide_and_conquer/divide_and_conquer/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_divide_and_conquer/hanota_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_divide_and_conquer/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_dynamic_programming/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_dynamic_programming/dp_problem_features/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_dynamic_programming/dp_solution_pipeline/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_dynamic_programming/edit_distance_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_dynamic_programming/intro_to_dynamic_programming/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_dynamic_programming/knapsack_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_dynamic_programming/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_dynamic_programming/unbounded_knapsack_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_graph/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_graph/graph/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_graph/graph_operations/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_graph/graph_traversal/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_graph/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_greedy/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_greedy/fractional_knapsack_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_greedy/greedy_algorithm/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_greedy/max_capacity_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_greedy/max_product_cutting_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_greedy/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_hashing/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_hashing/hash_algorithm/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_hashing/hash_collision/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_hashing/hash_map/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_hashing/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_heap/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_heap/build_heap/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_heap/heap/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_heap/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_heap/top_k/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_hello_algo/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_introduction/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_introduction/algorithms_are_everywhere/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_introduction/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_introduction/what_is_dsa/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_preface/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_preface/about_the_book/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_preface/suggestions/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_preface/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_reference/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_searching/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_searching/binary_search/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_searching/binary_search_edge/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_searching/binary_search_insertion/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_searching/replace_linear_by_hashing/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_searching/searching_algorithm_revisited/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_searching/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_sorting/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_sorting/bubble_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_sorting/bucket_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_sorting/counting_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_sorting/heap_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_sorting/insertion_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_sorting/merge_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_sorting/quick_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_sorting/radix_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_sorting/selection_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_sorting/sorting_algorithm/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_sorting/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_stack_and_queue/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_stack_and_queue/deque/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_stack_and_queue/queue/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_stack_and_queue/stack/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_stack_and_queue/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_tree/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_tree/array_representation_of_tree/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_tree/avl_tree/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_tree/binary_search_tree/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_tree/binary_tree/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_tree/binary_tree_traversal/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_tree/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>

Binary file not shown.

View file

@ -501,11 +501,11 @@
</h3>
<div class="profile-div">
<div class="profile-cell">
<a href="https://github.com/codingonion">
<img alt="Reviewer: codingonion" class="profile-img" src="assets/avatar/avatar_codingonion.jpg"/>
<a href="https://github.com/coderonion">
<img alt="Reviewer: coderonion" class="profile-img" src="assets/avatar/avatar_coderonion.jpg"/>
<br/>
<b>
codingonion
coderonion
</b>
<br/>
<sub>

File diff suppressed because one or more lines are too long

View file

@ -2,532 +2,532 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.hello-algo.com/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_appendix/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_appendix/contribution/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_appendix/installation/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_appendix/terminology/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_array_and_linkedlist/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_array_and_linkedlist/array/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_array_and_linkedlist/linked_list/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_array_and_linkedlist/list/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_array_and_linkedlist/ram_and_cache/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_array_and_linkedlist/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_backtracking/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_backtracking/backtracking_algorithm/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_backtracking/n_queens_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_backtracking/permutations_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_backtracking/subset_sum_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_backtracking/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_computational_complexity/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_computational_complexity/iteration_and_recursion/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_computational_complexity/performance_evaluation/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_computational_complexity/space_complexity/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_computational_complexity/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_computational_complexity/time_complexity/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_data_structure/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_data_structure/basic_data_types/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_data_structure/character_encoding/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_data_structure/classification_of_data_structure/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_data_structure/number_encoding/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_data_structure/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_divide_and_conquer/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_divide_and_conquer/binary_search_recur/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_divide_and_conquer/build_binary_tree_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_divide_and_conquer/divide_and_conquer/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_divide_and_conquer/hanota_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_divide_and_conquer/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_dynamic_programming/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_dynamic_programming/dp_problem_features/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_dynamic_programming/dp_solution_pipeline/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_dynamic_programming/edit_distance_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_dynamic_programming/intro_to_dynamic_programming/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_dynamic_programming/knapsack_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_dynamic_programming/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_dynamic_programming/unbounded_knapsack_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_graph/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_graph/graph/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_graph/graph_operations/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_graph/graph_traversal/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_graph/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_greedy/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_greedy/fractional_knapsack_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_greedy/greedy_algorithm/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_greedy/max_capacity_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_greedy/max_product_cutting_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_greedy/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_hashing/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_hashing/hash_algorithm/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_hashing/hash_collision/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_hashing/hash_map/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_hashing/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_heap/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_heap/build_heap/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_heap/heap/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_heap/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_heap/top_k/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_hello_algo/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_introduction/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_introduction/algorithms_are_everywhere/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_introduction/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_introduction/what_is_dsa/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_paperbook/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_preface/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_preface/about_the_book/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_preface/suggestions/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_preface/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_reference/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_searching/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_searching/binary_search/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_searching/binary_search_edge/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_searching/binary_search_insertion/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_searching/replace_linear_by_hashing/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_searching/searching_algorithm_revisited/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_searching/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/bubble_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/bucket_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/counting_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/heap_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/insertion_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/merge_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/quick_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/radix_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/selection_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/sorting_algorithm/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_stack_and_queue/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_stack_and_queue/deque/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_stack_and_queue/queue/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_stack_and_queue/stack/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_stack_and_queue/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_tree/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_tree/array_representation_of_tree/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_tree/avl_tree/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_tree/binary_search_tree/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_tree/binary_tree/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_tree/binary_tree_traversal/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_tree/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>

Binary file not shown.

View file

@ -5837,7 +5837,7 @@ O(1) &lt; O(\log n) &lt; O(n) &lt; O(n \log n) &lt; O(n^2) &lt; O(2^n) &lt; O(n!
</details>
<h3 id="4-o2n">4. &nbsp; 指數階 <span class="arithmatex">\(O(2^n)\)</span><a class="headerlink" href="#4-o2n" title="Permanent link">&para;</a></h3>
<p>生物學的“細胞分裂”是指數階增長的典型例子:初始狀態為 <span class="arithmatex">\(1\)</span> 個細胞,分裂一輪後變為 <span class="arithmatex">\(2\)</span> 個,分裂兩輪後變為 <span class="arithmatex">\(4\)</span> 個,以此類推,分裂 <span class="arithmatex">\(n\)</span> 輪後有 <span class="arithmatex">\(2^n\)</span> 個細胞。</p>
<p>圖 2-11 和以下程式碼模擬了細胞分裂的過程,時間複雜度為 <span class="arithmatex">\(O(2^n)\)</span> </p>
<p>圖 2-11 和以下程式碼模擬了細胞分裂的過程,時間複雜度為 <span class="arithmatex">\(O(2^n)\)</span> 。請注意,輸入 <span class="arithmatex">\(n\)</span> 表示分裂輪數,返回值 <code>count</code> 表示總分裂次數。</p>
<div class="tabbed-set tabbed-alternate" data-tabs="10:14"><input checked="checked" id="__tabbed_10_1" name="__tabbed_10" type="radio" /><input id="__tabbed_10_2" name="__tabbed_10" type="radio" /><input id="__tabbed_10_3" name="__tabbed_10" type="radio" /><input id="__tabbed_10_4" name="__tabbed_10" type="radio" /><input id="__tabbed_10_5" name="__tabbed_10" type="radio" /><input id="__tabbed_10_6" name="__tabbed_10" type="radio" /><input id="__tabbed_10_7" name="__tabbed_10" type="radio" /><input id="__tabbed_10_8" name="__tabbed_10" type="radio" /><input id="__tabbed_10_9" name="__tabbed_10" type="radio" /><input id="__tabbed_10_10" name="__tabbed_10" type="radio" /><input id="__tabbed_10_11" name="__tabbed_10" type="radio" /><input id="__tabbed_10_12" name="__tabbed_10" type="radio" /><input id="__tabbed_10_13" name="__tabbed_10" type="radio" /><input id="__tabbed_10_14" name="__tabbed_10" type="radio" /><div class="tabbed-labels"><label for="__tabbed_10_1">Python</label><label for="__tabbed_10_2">C++</label><label for="__tabbed_10_3">Java</label><label for="__tabbed_10_4">C#</label><label for="__tabbed_10_5">Go</label><label for="__tabbed_10_6">Swift</label><label for="__tabbed_10_7">JS</label><label for="__tabbed_10_8">TS</label><label for="__tabbed_10_9">Dart</label><label for="__tabbed_10_10">Rust</label><label for="__tabbed_10_11">C</label><label for="__tabbed_10_12">Kotlin</label><label for="__tabbed_10_13">Ruby</label><label for="__tabbed_10_14">Zig</label></div>
<div class="tabbed-content">
<div class="tabbed-block">

View file

@ -3642,8 +3642,8 @@
<p align="center"> 圖 0-1 &nbsp; 本書主要內容 </p>
<h2 id="013">0.1.3 &nbsp; 致謝<a class="headerlink" href="#013" title="Permanent link">&para;</a></h2>
<p>本書在開源社群眾多貢獻者的共同努力下不斷完善。感謝每一位投入時間與精力的撰稿人,他們是(按照 GitHub 自動生成的順序krahets、Gonglja、nuomi1、codingonion、Reanon、justin-tse、hpstory、danielsss、curtishd、night-cruise、S-N-O-R-L-A-X、msk397、gvenusleo、RiverTwilight、gyt95、zhuoqinyue、Zuoxun、mingXta、hello-ikun、khoaxuantu、FangYuan33、GN-Yu、longsizhuo、mgisr、Cathay-Chen、guowei-gong、xBLACKICEx、K3v123、IsChristina、JoseHung、qualifier1024、pengchzn、Guanngxu、QiLOL、L-Super、WSL0809、Slone123c、lhxsm、yuan0221、what-is-me、rongyi、JeffersonHuang、longranger2、theNefelibatas、yuelinxin、xiongsp、nanlei、a16su、cy-by-side、gaofer、malone6、Wonderdch、hongyun-robot、XiaChuerwu、yd-j、bluebean-cloud、iron-irax、he-weilai、Nigh、MolDuM、Phoenix0415、XC-Zero、SamJin98、reeswell、NI-SW、Horbin-Magician、xjr7670、YangXuanyi、DullSword、iStig、qq909244296、jiaxianhua、wenjianmin、keshida、kilikilikid、lclc6、lwbaptx、luluxia、boloboloda、hts0000、gledfish、fbigm、echo1937、szu17dmy、dshlstarr、coderlef、czruby、beintentional、KeiichiKasai、xb534、ElaBosak233、baagod、zhouLion、yishangzhang、yi427、yabo083、weibk、wangwang105、th1nk3r-ing、tao363、4yDX3906、syd168、siqyka、selear、sdshaoda、noobcodemaker、chadyi、lyl625760、lucaswangdev、liuxjerry、0130w、shanghai-Jerry、JackYang-hellobobo、Javesun99、lipusheng、ShiMaRing、FreddieLi、FloranceYeh、Transmigration-zhou、fanchenggang、gltianwen、Dr-XYZ、curly210102、CuB3y0nd、youshaoXG、bubble9um、fanenr、52coder、foursevenlove、KorsChen、ZongYangL、hezhizhen、linzeyan、ZJKung、GaochaoZhu、yang-le、Evilrabbit520、Turing-1024-Lee、Suremotoo、Allen-Scai、Richard-Zhang1019、qingpeng9802、primexiao、nidhoggfgg、1ch0、MwumLi、ZnYang2018、hugtyftg、logan-qiu、psychelzh 和 Keynman</p>
<p>本書的程式碼審閱工作由 codingonion、curtishd、Gonglja、gvenusleo、hpstory、justin-tse、khoaxuantu、krahets、night-cruise、nuomi1 和 Reanon 完成(按照首字母順序排列)。感謝他們付出的時間與精力,正是他們確保了各語言程式碼的規範與統一。</p>
<p>本書在開源社群眾多貢獻者的共同努力下不斷完善。感謝每一位投入時間與精力的撰稿人,他們是(按照 GitHub 自動生成的順序krahets、coderonion、Gonglja、nuomi1、Reanon、justin-tse、hpstory、danielsss、curtishd、night-cruise、S-N-O-R-L-A-X、msk397、gvenusleo、khoaxuantu、RiverTwilight、rongyi、gyt95、zhuoqinyue、K3v123、Zuoxun、mingXta、hello-ikun、FangYuan33、GN-Yu、yuelinxin、longsizhuo、Cathay-Chen、guowei-gong、xBLACKICEx、IsChristina、JoseHung、qualifier1024、QiLOL、pengchzn、Guanngxu、L-Super、WSL0809、Slone123c、lhxsm、yuan0221、what-is-me、theNefelibatas、longranger2、cy-by-side、xiongsp、JeffersonHuang、Transmigration-zhou、magentaqin、Wonderdch、malone6、xiaomiusa87、gaofer、bluebean-cloud、a16su、Shyam-Chen、nanlei、hongyun-robot、Phoenix0415、MolDuM、Nigh、he-weilai、junminhong、mgisr、iron-irax、yd-j、XiaChuerwu、XC-Zero、seven1240、SamJin98、wodray、reeswell、NI-SW、Horbin-Magician、Enlightenus、xjr7670、YangXuanyi、DullSword、boloboloda、iStig、qq909244296、jiaxianhua、wenjianmin、keshida、kilikilikid、lclc6、lwbaptx、liuxjerry、lucaswangdev、lyl625760、hts0000、gledfish、fbigm、echo1937、szu17dmy、dshlstarr、Yucao-cy、coderlef、czruby、bongbongbakudan、beintentional、ZongYangL、ZhongYuuu、luluxia、xb534、bitsmi、ElaBosak233、baagod、zhouLion、yishangzhang、yi427、yabo083、weibk、wangwang105、th1nk3r-ing、tao363、4yDX3906、syd168、steventimes、sslmj2020、smilelsb、siqyka、selear、sdshaoda、Xi-Row、popozhu、nuquist19、noobcodemaker、XiaoK29、chadyi、ZhongGuanbin、shanghai-Jerry、JackYang-hellobobo、Javesun99、lipusheng、BlindTerran、ShiMaRing、FreddieLi、FloranceYeh、iFleey、fanchenggang、gltianwen、goerll、Dr-XYZ、nedchu、curly210102、CuB3y0nd、KraHsu、CarrotDLaw、youshaoXG、bubble9um、fanenr、eagleanurag、LifeGoesOnionOnionOnion、52coder、foursevenlove、KorsChen、hezhizhen、linzeyan、ZJKung、GaochaoZhu、hopkings2008、yang-le、Evilrabbit520、Turing-1024-Lee、thomasq0、Suremotoo、Allen-Scai、Risuntsy、Richard-Zhang1019、qingpeng9802、primexiao、nidhoggfgg、1ch0、MwumLi、martinx、ZnYang2018、hugtyftg、logan-qiu、psychelzh、Keynman、KeiichiKasai、0130w</p>
<p>本書的程式碼審閱工作由 coderonion、curtishd、Gonglja、gvenusleo、hpstory、justin-tse、khoaxuantu、krahets、night-cruise、nuomi1、Reanon 和 rongyi 完成(按照首字母順序排列)。感謝他們付出的時間與精力,正是他們確保了各語言程式碼的規範與統一。</p>
<p>在本書的創作過程中,我得到了許多人的幫助。</p>
<ul>
<li>感謝我在公司的導師李汐博士,在一次暢談中你鼓勵我“快行動起來”,堅定了我寫這本書的決心;</li>

View file

@ -7153,6 +7153,18 @@
<a id="__codelineno-38-102" name="__codelineno-38-102" href="#__codelineno-38-102"></a><span class="w"> </span><span class="n">deque</span><span class="o">-&gt;</span><span class="n">queSize</span><span class="o">--</span><span class="p">;</span>
<a id="__codelineno-38-103" name="__codelineno-38-103" href="#__codelineno-38-103"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">num</span><span class="p">;</span>
<a id="__codelineno-38-104" name="__codelineno-38-104" href="#__codelineno-38-104"></a><span class="p">}</span>
<a id="__codelineno-38-105" name="__codelineno-38-105" href="#__codelineno-38-105"></a>
<a id="__codelineno-38-106" name="__codelineno-38-106" href="#__codelineno-38-106"></a><span class="cm">/* 返回陣列用於列印 */</span>
<a id="__codelineno-38-107" name="__codelineno-38-107" href="#__codelineno-38-107"></a><span class="kt">int</span><span class="w"> </span><span class="o">*</span><span class="nf">toArray</span><span class="p">(</span><span class="n">ArrayDeque</span><span class="w"> </span><span class="o">*</span><span class="n">deque</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="o">*</span><span class="n">queSize</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="__codelineno-38-108" name="__codelineno-38-108" href="#__codelineno-38-108"></a><span class="w"> </span><span class="o">*</span><span class="n">queSize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">deque</span><span class="o">-&gt;</span><span class="n">queSize</span><span class="p">;</span>
<a id="__codelineno-38-109" name="__codelineno-38-109" href="#__codelineno-38-109"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="o">*</span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">calloc</span><span class="p">(</span><span class="n">deque</span><span class="o">-&gt;</span><span class="n">queSize</span><span class="p">,</span><span class="w"> </span><span class="k">sizeof</span><span class="p">(</span><span class="kt">int</span><span class="p">));</span>
<a id="__codelineno-38-110" name="__codelineno-38-110" href="#__codelineno-38-110"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">j</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">deque</span><span class="o">-&gt;</span><span class="n">front</span><span class="p">;</span>
<a id="__codelineno-38-111" name="__codelineno-38-111" href="#__codelineno-38-111"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="n">deque</span><span class="o">-&gt;</span><span class="n">queSize</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="__codelineno-38-112" name="__codelineno-38-112" href="#__codelineno-38-112"></a><span class="w"> </span><span class="n">res</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">deque</span><span class="o">-&gt;</span><span class="n">nums</span><span class="p">[</span><span class="n">j</span><span class="w"> </span><span class="o">%</span><span class="w"> </span><span class="n">deque</span><span class="o">-&gt;</span><span class="n">queCapacity</span><span class="p">];</span>
<a id="__codelineno-38-113" name="__codelineno-38-113" href="#__codelineno-38-113"></a><span class="w"> </span><span class="n">j</span><span class="o">++</span><span class="p">;</span>
<a id="__codelineno-38-114" name="__codelineno-38-114" href="#__codelineno-38-114"></a><span class="w"> </span><span class="p">}</span>
<a id="__codelineno-38-115" name="__codelineno-38-115" href="#__codelineno-38-115"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">res</span><span class="p">;</span>
<a id="__codelineno-38-116" name="__codelineno-38-116" href="#__codelineno-38-116"></a><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">

View file

@ -5826,6 +5826,18 @@
<a id="__codelineno-38-65" name="__codelineno-38-65" href="#__codelineno-38-65"></a><span class="w"> </span><span class="n">queue</span><span class="o">-&gt;</span><span class="n">queSize</span><span class="o">--</span><span class="p">;</span>
<a id="__codelineno-38-66" name="__codelineno-38-66" href="#__codelineno-38-66"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">num</span><span class="p">;</span>
<a id="__codelineno-38-67" name="__codelineno-38-67" href="#__codelineno-38-67"></a><span class="p">}</span>
<a id="__codelineno-38-68" name="__codelineno-38-68" href="#__codelineno-38-68"></a>
<a id="__codelineno-38-69" name="__codelineno-38-69" href="#__codelineno-38-69"></a><span class="cm">/* 返回陣列用於列印 */</span>
<a id="__codelineno-38-70" name="__codelineno-38-70" href="#__codelineno-38-70"></a><span class="kt">int</span><span class="w"> </span><span class="o">*</span><span class="nf">toArray</span><span class="p">(</span><span class="n">ArrayQueue</span><span class="w"> </span><span class="o">*</span><span class="n">queue</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="o">*</span><span class="n">queSize</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="__codelineno-38-71" name="__codelineno-38-71" href="#__codelineno-38-71"></a><span class="w"> </span><span class="o">*</span><span class="n">queSize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">queue</span><span class="o">-&gt;</span><span class="n">queSize</span><span class="p">;</span>
<a id="__codelineno-38-72" name="__codelineno-38-72" href="#__codelineno-38-72"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="o">*</span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">calloc</span><span class="p">(</span><span class="n">queue</span><span class="o">-&gt;</span><span class="n">queSize</span><span class="p">,</span><span class="w"> </span><span class="k">sizeof</span><span class="p">(</span><span class="kt">int</span><span class="p">));</span>
<a id="__codelineno-38-73" name="__codelineno-38-73" href="#__codelineno-38-73"></a><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">j</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">queue</span><span class="o">-&gt;</span><span class="n">front</span><span class="p">;</span>
<a id="__codelineno-38-74" name="__codelineno-38-74" href="#__codelineno-38-74"></a><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="n">queue</span><span class="o">-&gt;</span><span class="n">queSize</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="__codelineno-38-75" name="__codelineno-38-75" href="#__codelineno-38-75"></a><span class="w"> </span><span class="n">res</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">queue</span><span class="o">-&gt;</span><span class="n">nums</span><span class="p">[</span><span class="n">j</span><span class="w"> </span><span class="o">%</span><span class="w"> </span><span class="n">queue</span><span class="o">-&gt;</span><span class="n">queCapacity</span><span class="p">];</span>
<a id="__codelineno-38-76" name="__codelineno-38-76" href="#__codelineno-38-76"></a><span class="w"> </span><span class="n">j</span><span class="o">++</span><span class="p">;</span>
<a id="__codelineno-38-77" name="__codelineno-38-77" href="#__codelineno-38-77"></a><span class="w"> </span><span class="p">}</span>
<a id="__codelineno-38-78" name="__codelineno-38-78" href="#__codelineno-38-78"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">res</span><span class="p">;</span>
<a id="__codelineno-38-79" name="__codelineno-38-79" href="#__codelineno-38-79"></a><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">

View file

@ -501,11 +501,11 @@
</h3>
<div class="profile-div">
<div class="profile-cell">
<a href="https://github.com/codingonion">
<img alt="Reviewer: codingonion" class="profile-img" src="../assets/avatar/avatar_codingonion.jpg"/>
<a href="https://github.com/coderonion">
<img alt="Reviewer: coderonion" class="profile-img" src="../assets/avatar/avatar_coderonion.jpg"/>
<br/>
<b>
codingonion
coderonion
</b>
<br/>
<sub>

File diff suppressed because one or more lines are too long

View file

@ -2,527 +2,527 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.hello-algo.com/zh-hant/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_appendix/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_appendix/contribution/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_appendix/installation/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_appendix/terminology/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_array_and_linkedlist/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_array_and_linkedlist/array/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_array_and_linkedlist/linked_list/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_array_and_linkedlist/list/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_array_and_linkedlist/ram_and_cache/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_array_and_linkedlist/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_backtracking/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_backtracking/backtracking_algorithm/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_backtracking/n_queens_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_backtracking/permutations_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_backtracking/subset_sum_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_backtracking/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_computational_complexity/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_computational_complexity/iteration_and_recursion/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_computational_complexity/performance_evaluation/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_computational_complexity/space_complexity/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_computational_complexity/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_computational_complexity/time_complexity/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_data_structure/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_data_structure/basic_data_types/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_data_structure/character_encoding/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_data_structure/classification_of_data_structure/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_data_structure/number_encoding/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_data_structure/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_divide_and_conquer/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_divide_and_conquer/binary_search_recur/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_divide_and_conquer/build_binary_tree_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_divide_and_conquer/divide_and_conquer/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_divide_and_conquer/hanota_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_divide_and_conquer/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_dynamic_programming/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_dynamic_programming/dp_problem_features/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_dynamic_programming/dp_solution_pipeline/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_dynamic_programming/edit_distance_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_dynamic_programming/intro_to_dynamic_programming/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_dynamic_programming/knapsack_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_dynamic_programming/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_dynamic_programming/unbounded_knapsack_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_graph/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_graph/graph/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_graph/graph_operations/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_graph/graph_traversal/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_graph/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_greedy/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_greedy/fractional_knapsack_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_greedy/greedy_algorithm/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_greedy/max_capacity_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_greedy/max_product_cutting_problem/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_greedy/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_hashing/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_hashing/hash_algorithm/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_hashing/hash_collision/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_hashing/hash_map/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_hashing/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_heap/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_heap/build_heap/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_heap/heap/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_heap/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_heap/top_k/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_hello_algo/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_introduction/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_introduction/algorithms_are_everywhere/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_introduction/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_introduction/what_is_dsa/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_preface/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_preface/about_the_book/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_preface/suggestions/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_preface/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_reference/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_searching/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_searching/binary_search/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_searching/binary_search_edge/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_searching/binary_search_insertion/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_searching/replace_linear_by_hashing/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_searching/searching_algorithm_revisited/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_searching/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_sorting/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_sorting/bubble_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_sorting/bucket_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_sorting/counting_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_sorting/heap_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_sorting/insertion_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_sorting/merge_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_sorting/quick_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_sorting/radix_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_sorting/selection_sort/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_sorting/sorting_algorithm/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_sorting/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_stack_and_queue/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_stack_and_queue/deque/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_stack_and_queue/queue/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_stack_and_queue/stack/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_stack_and_queue/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_tree/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_tree/array_representation_of_tree/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_tree/avl_tree/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_tree/binary_search_tree/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_tree/binary_tree/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_tree/binary_tree_traversal/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_tree/summary/</loc>
<lastmod>2024-11-30</lastmod>
<lastmod>2024-12-04</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>

Binary file not shown.