This commit is contained in:
krahets 2025-01-21 20:03:41 +08:00
parent 955dfbbbe7
commit 1b1e1e354a
20 changed files with 369 additions and 360 deletions

View File

@ -4089,7 +4089,7 @@ dp[i, j] = \min(dp[i-1, j], dp[i, j-1]) + grid[i, j]
<p><a class="glightbox" href="../dp_solution_pipeline.assets/min_path_sum_dfs.png" data-type="image" data-width="100%" data-height="auto" data-desc-position="bottom"><img alt="暴力搜索递归树" class="animation-figure" src="../dp_solution_pipeline.assets/min_path_sum_dfs.png" /></a></p>
<p align="center"> 图 14-14 &nbsp; 暴力搜索递归树 </p>
<p>每个状态都有向下和向右两种选择,从左上角走到右下角总共需要 <span class="arithmatex">\(m + n - 2\)</span> 步,所以最差时间复杂度为 <span class="arithmatex">\(O(2^{m + n})\)</span> 。请注意,这种计算方式未考虑临近网格边界的情况,当到达网络边界时只剩下一种选择,因此实际的路径数量会少一些。</p>
<p>每个状态都有向下和向右两种选择,从左上角走到右下角总共需要 <span class="arithmatex">\(m + n - 2\)</span> 步,所以最差时间复杂度为 <span class="arithmatex">\(O(2^{m + n})\)</span> ,其中 <span class="arithmatex">\(n\)</span><span class="arithmatex">\(m\)</span> 分别为网格的行数和列数。请注意,这种计算方式未考虑临近网格边界的情况,当到达网络边界时只剩下一种选择,因此实际的路径数量会少一些。</p>
<h3 id="2">2. &nbsp; 方法二:记忆化搜索<a class="headerlink" href="#2" title="Permanent link">&para;</a></h3>
<p>我们引入一个和网格 <code>grid</code> 相同尺寸的记忆列表 <code>mem</code> ,用于记录各个子问题的解,并将重叠子问题进行剪枝:</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>

View File

@ -3651,7 +3651,7 @@
<h1 id="117">11.7 &nbsp; 堆排序<a class="headerlink" href="#117" title="Permanent link">&para;</a></h1>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>阅读本节前,请确保已学完“堆章节。</p>
<p>阅读本节前,请确保已学完“堆章节。</p>
</div>
<p><u>堆排序heap sort</u>是一种基于堆数据结构实现的高效排序算法。我们可以利用已经学过的“建堆操作”和“元素出堆操作”实现堆排序。</p>
<ol>

View File

@ -4210,7 +4210,7 @@
<a id="__codelineno-14-61" name="__codelineno-14-61" href="#__codelineno-14-61"></a> <span class="n">val</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_front</span><span class="o">.</span><span class="n">val</span> <span class="c1"># 暂存头节点值</span>
<a id="__codelineno-14-62" name="__codelineno-14-62" href="#__codelineno-14-62"></a> <span class="c1"># 删除头节点</span>
<a id="__codelineno-14-63" name="__codelineno-14-63" href="#__codelineno-14-63"></a> <span class="n">fnext</span><span class="p">:</span> <span class="n">ListNode</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_front</span><span class="o">.</span><span class="n">next</span>
<a id="__codelineno-14-64" name="__codelineno-14-64" href="#__codelineno-14-64"></a> <span class="k">if</span> <span class="n">fnext</span> <span class="o">!=</span> <span class="kc">None</span><span class="p">:</span>
<a id="__codelineno-14-64" name="__codelineno-14-64" href="#__codelineno-14-64"></a> <span class="k">if</span> <span class="n">fnext</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<a id="__codelineno-14-65" name="__codelineno-14-65" href="#__codelineno-14-65"></a> <span class="n">fnext</span><span class="o">.</span><span class="n">prev</span> <span class="o">=</span> <span class="kc">None</span>
<a id="__codelineno-14-66" name="__codelineno-14-66" href="#__codelineno-14-66"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_front</span><span class="o">.</span><span class="n">next</span> <span class="o">=</span> <span class="kc">None</span>
<a id="__codelineno-14-67" name="__codelineno-14-67" href="#__codelineno-14-67"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_front</span> <span class="o">=</span> <span class="n">fnext</span> <span class="c1"># 更新头节点</span>
@ -4219,7 +4219,7 @@
<a id="__codelineno-14-70" name="__codelineno-14-70" href="#__codelineno-14-70"></a> <span class="n">val</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_rear</span><span class="o">.</span><span class="n">val</span> <span class="c1"># 暂存尾节点值</span>
<a id="__codelineno-14-71" name="__codelineno-14-71" href="#__codelineno-14-71"></a> <span class="c1"># 删除尾节点</span>
<a id="__codelineno-14-72" name="__codelineno-14-72" href="#__codelineno-14-72"></a> <span class="n">rprev</span><span class="p">:</span> <span class="n">ListNode</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_rear</span><span class="o">.</span><span class="n">prev</span>
<a id="__codelineno-14-73" name="__codelineno-14-73" href="#__codelineno-14-73"></a> <span class="k">if</span> <span class="n">rprev</span> <span class="o">!=</span> <span class="kc">None</span><span class="p">:</span>
<a id="__codelineno-14-73" name="__codelineno-14-73" href="#__codelineno-14-73"></a> <span class="k">if</span> <span class="n">rprev</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<a id="__codelineno-14-74" name="__codelineno-14-74" href="#__codelineno-14-74"></a> <span class="n">rprev</span><span class="o">.</span><span class="n">next</span> <span class="o">=</span> <span class="kc">None</span>
<a id="__codelineno-14-75" name="__codelineno-14-75" href="#__codelineno-14-75"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_rear</span><span class="o">.</span><span class="n">prev</span> <span class="o">=</span> <span class="kc">None</span>
<a id="__codelineno-14-76" name="__codelineno-14-76" href="#__codelineno-14-76"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_rear</span> <span class="o">=</span> <span class="n">rprev</span> <span class="c1"># 更新尾节点</span>

View File

@ -4255,6 +4255,8 @@
<a id="__codelineno-29-5" name="__codelineno-29-5" href="#__codelineno-29-5"></a><span class="n">P</span><span class="o">-&gt;</span><span class="n">left</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">n2</span><span class="p">;</span>
<a id="__codelineno-29-6" name="__codelineno-29-6" href="#__codelineno-29-6"></a><span class="c1">// 删除节点 P</span>
<a id="__codelineno-29-7" name="__codelineno-29-7" href="#__codelineno-29-7"></a><span class="n">n1</span><span class="o">-&gt;</span><span class="n">left</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">n2</span><span class="p">;</span>
<a id="__codelineno-29-8" name="__codelineno-29-8" href="#__codelineno-29-8"></a><span class="c1">// 释放内存</span>
<a id="__codelineno-29-9" name="__codelineno-29-9" href="#__codelineno-29-9"></a><span class="k">delete</span><span class="w"> </span><span class="n">P</span><span class="p">;</span>
</code></pre></div>
</div>
<div class="tabbed-block">
@ -4342,6 +4344,8 @@
<a id="__codelineno-38-5" name="__codelineno-38-5" href="#__codelineno-38-5"></a><span class="n">P</span><span class="o">-&gt;</span><span class="n">left</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">n2</span><span class="p">;</span>
<a id="__codelineno-38-6" name="__codelineno-38-6" href="#__codelineno-38-6"></a><span class="c1">// 删除节点 P</span>
<a id="__codelineno-38-7" name="__codelineno-38-7" href="#__codelineno-38-7"></a><span class="n">n1</span><span class="o">-&gt;</span><span class="n">left</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">n2</span><span class="p">;</span>
<a id="__codelineno-38-8" name="__codelineno-38-8" href="#__codelineno-38-8"></a><span class="c1">// 释放内存</span>
<a id="__codelineno-38-9" name="__codelineno-38-9" href="#__codelineno-38-9"></a><span class="n">free</span><span class="p">(</span><span class="n">P</span><span class="p">);</span>
</code></pre></div>
</div>
<div class="tabbed-block">

View File

@ -3586,10 +3586,10 @@
<h1 id="21-algorithm-efficiency-assessment">2.1 &nbsp; Algorithm efficiency assessment<a class="headerlink" href="#21-algorithm-efficiency-assessment" title="Permanent link">&para;</a></h1>
<p>In algorithm design, we pursue the following two objectives in sequence.</p>
<ol>
<li><strong>Finding a Solution to the Problem</strong>: The algorithm should reliably find the correct solution within the stipulated range of inputs.</li>
<li><strong>Finding a Solution to the Problem</strong>: The algorithm should reliably find the correct solution within the specified range of inputs.</li>
<li><strong>Seeking the Optimal Solution</strong>: For the same problem, multiple solutions might exist, and we aim to find the most efficient algorithm possible.</li>
</ol>
<p>In other words, under the premise of being able to solve the problem, algorithm efficiency has become the main criterion for evaluating the merits of an algorithm, which includes the following two dimensions.</p>
<p>In other words, under the premise of being able to solve the problem, algorithm efficiency has become the main criterion for evaluating an algorithm, which includes the following two dimensions.</p>
<ul>
<li><strong>Time efficiency</strong>: The speed at which an algorithm runs.</li>
<li><strong>Space efficiency</strong>: The size of the memory space occupied by an algorithm.</li>
@ -3597,29 +3597,30 @@
<p>In short, <strong>our goal is to design data structures and algorithms that are both fast and memory-efficient</strong>. Effectively assessing algorithm efficiency is crucial because only then can we compare various algorithms and guide the process of algorithm design and optimization.</p>
<p>There are mainly two methods of efficiency assessment: actual testing and theoretical estimation.</p>
<h2 id="211-actual-testing">2.1.1 &nbsp; Actual testing<a class="headerlink" href="#211-actual-testing" title="Permanent link">&para;</a></h2>
<p>Suppose we have algorithms <code>A</code> and <code>B</code>, both capable of solving the same problem, and we need to compare their efficiencies. The most direct method is to use a computer to run these two algorithms and monitor and record their runtime and memory usage. This assessment method reflects the actual situation but has significant limitations.</p>
<p>On one hand, <strong>it's difficult to eliminate interference from the testing environment</strong>. Hardware configurations can affect algorithm performance. For example, algorithm <code>A</code> might run faster than <code>B</code> on one computer, but the opposite result may occur on another computer with different configurations. This means we would need to test on a variety of machines to calculate average efficiency, which is impractical.</p>
<p>On the other hand, <strong>conducting a full test is very resource-intensive</strong>. As the volume of input data changes, the efficiency of the algorithms may vary. For example, with smaller data volumes, algorithm <code>A</code> might run faster than <code>B</code>, but the opposite might be true with larger data volumes. Therefore, to draw convincing conclusions, we need to test a wide range of input data sizes, which requires significant computational resources.</p>
<p>Suppose we have algorithms <code>A</code> and <code>B</code>, both capable of solving the same problem, and we need to compare their efficiencies. The most direct method is to use a computer to run these two algorithms, monitor and record their runtime and memory usage. This assessment method reflects the actual situation, but it has significant limitations.</p>
<p>On one hand, <strong>it's difficult to eliminate interference from the testing environment</strong>. Hardware configurations can affect algorithm performance. For example, an algorithm with a high degree of parallelism is better suited for running on multi-core CPUs, while an algorithm that involves intensive memory operations performs better with high-performance memory. The test results of an algorithm may vary across different machines. This means testing across multiple machines to calculate average efficiency becomes impractical.</p>
<p>On the other hand, <strong>conducting a full test is very resource-intensive</strong>. Algorithm efficiency varies with input data size. For example, with smaller data volumes, algorithm <code>A</code> might run faster than <code>B</code>, but with larger data volumes, the test results may be the opposite. Therefore, to draw convincing conclusions, we need to test a wide range of input data sizes, which requires excessive computational resources.</p>
<h2 id="212-theoretical-estimation">2.1.2 &nbsp; Theoretical estimation<a class="headerlink" href="#212-theoretical-estimation" title="Permanent link">&para;</a></h2>
<p>Due to the significant limitations of actual testing, we can consider evaluating algorithm efficiency solely through calculations. This estimation method is known as <u>asymptotic complexity analysis</u>, or simply <u>complexity analysis</u>.</p>
<p>Complexity analysis reflects the relationship between the time and space resources required for algorithm execution and the size of the input data. <strong>It describes the trend of growth in the time and space required by the algorithm as the size of the input data increases</strong>. This definition might sound complex, but we can break it down into three key points to understand it better.</p>
<ul>
<li>"Time and space resources" correspond to <u>time complexity</u> and <u>space complexity</u>, respectively.</li>
<li>"As the size of input data increases" means that complexity reflects the relationship between algorithm efficiency and the volume of input data.</li>
<li>"The trend of growth in time and space" indicates that complexity analysis focuses not on the specific values of runtime or space occupied but on the "rate" at which time or space grows.</li>
<li>"The trend of growth in time and space" indicates that complexity analysis focuses not on the specific values of runtime or space occupied, but on the "rate" at which time or space increases.</li>
</ul>
<p><strong>Complexity analysis overcomes the disadvantages of actual testing methods</strong>, reflected in the following aspects:</p>
<ul>
<li>It does not require actually running the code, making it more environmentally friendly and energy efficient.</li>
<li>It is independent of the testing environment and applicable to all operating platforms.</li>
<li>It can reflect algorithm efficiency under different data volumes, especially in the performance of algorithms with large data volumes.</li>
</ul>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>If you're still confused about the concept of complexity, don't worry. We will introduce it in detail in subsequent chapters.</p>
<p>If you're still confused about the concept of complexity, don't worry. We will cover it in detail in subsequent chapters.</p>
</div>
<p>Complexity analysis provides us with a "ruler" to measure the time and space resources needed to execute an algorithm and compare the efficiency between different algorithms.</p>
<p>Complexity is a mathematical concept and may be abstract and challenging for beginners. From this perspective, complexity analysis might not be the best content to introduce first. However, when discussing the characteristics of a particular data structure or algorithm, it's hard to avoid analyzing its speed and space usage.</p>
<p>In summary, it's recommended that you establish a preliminary understanding of complexity analysis before diving deep into data structures and algorithms, <strong>so that you can carry out simple complexity analyses of algorithms</strong>.</p>
<p>Complexity analysis provides us with a "ruler" to evaluate the efficiency of an algorithm, enabling us to measure the time and space resources required to execute it and compare the efficiency of different algorithms.</p>
<p>Complexity is a mathematical concept that might be abstract and challenging for beginners. From this perspective, complexity analysis might not be the most suitable topic to introduce first. However, when discussing the characteristics of a particular data structure or algorithm, it's hard to avoid analyzing its speed and space usage.</p>
<p>In summary, it is recommended to develop a basic understanding of complexity analysis before diving deep into data structures and algorithms, <strong>so that you can perform complexity analysis on simple algorithms</strong>.</p>
<!-- Source file information -->

View File

@ -3602,40 +3602,40 @@
<!-- Page content -->
<h1 id="105-search-algorithms-revisited">10.5 &nbsp; Search algorithms revisited<a class="headerlink" href="#105-search-algorithms-revisited" title="Permanent link">&para;</a></h1>
<p><u>Searching algorithms (searching algorithm)</u> are used to search for one or several elements that meet specific criteria in data structures such as arrays, linked lists, trees, or graphs.</p>
<p>Searching algorithms can be divided into the following two categories based on their implementation approaches.</p>
<p><u>Searching algorithms (search algorithms)</u> are used to retrieve one or more elements that meet specific criteria within data structures such as arrays, linked lists, trees, or graphs.</p>
<p>Searching algorithms can be divided into the following two categories based on their approach.</p>
<ul>
<li><strong>Locating the target element by traversing the data structure</strong>, such as traversals of arrays, linked lists, trees, and graphs, etc.</li>
<li><strong>Using the organizational structure of the data or the prior information contained in the data to achieve efficient element search</strong>, such as binary search, hash search, and binary search tree search, etc.</li>
<li><strong>Using the organizational structure of the data or existing data to achieve efficient element searches</strong>, such as binary search, hash search, binary search tree search, etc.</li>
</ul>
<p>It is not difficult to notice that these topics have been introduced in previous chapters, so searching algorithms are not unfamiliar to us. In this section, we will revisit searching algorithms from a more systematic perspective.</p>
<p>These topics were introduced in previous chapters, so they are not unfamiliar to us. In this section, we will revisit searching algorithms from a more systematic perspective.</p>
<h2 id="1051-brute-force-search">10.5.1 &nbsp; Brute-force search<a class="headerlink" href="#1051-brute-force-search" title="Permanent link">&para;</a></h2>
<p>Brute-force search locates the target element by traversing every element of the data structure.</p>
<p>A Brute-force search locates the target element by traversing every element of the data structure.</p>
<ul>
<li>"Linear search" is suitable for linear data structures such as arrays and linked lists. It starts from one end of the data structure, accesses each element one by one, until the target element is found or the other end is reached without finding the target element.</li>
<li>"Breadth-first search" and "Depth-first search" are two traversal strategies for graphs and trees. Breadth-first search starts from the initial node and searches layer by layer, accessing nodes from near to far. Depth-first search starts from the initial node, follows a path until the end, then backtracks and tries other paths until the entire data structure is traversed.</li>
<li>"Linear search" is suitable for linear data structures such as arrays and linked lists. It starts from one end of the data structure and accesses each element one by one until the target element is found or the other end is reached without finding the target element.</li>
<li>"Breadth-first search" and "Depth-first search" are two traversal strategies for graphs and trees. Breadth-first search starts from the initial node and searches layer by layer (left to right), accessing nodes from near to far. Depth-first search starts from the initial node, follows a path until the end (top to bottom), then backtracks and tries other paths until the entire data structure is traversed.</li>
</ul>
<p>The advantage of brute-force search is its simplicity and versatility, <strong>no need for data preprocessing and the help of additional data structures</strong>.</p>
<p>However, <strong>the time complexity of this type of algorithm is <span class="arithmatex">\(O(n)\)</span></strong>, where <span class="arithmatex">\(n\)</span> is the number of elements, so the performance is poor in cases of large data volumes.</p>
<p>The advantage of brute-force search is its simplicity and versatility, <strong>no need for data preprocessing or the help of additional data structures</strong>.</p>
<p>However, <strong>the time complexity of this type of algorithm is <span class="arithmatex">\(O(n)\)</span></strong>, where <span class="arithmatex">\(n\)</span> is the number of elements, so the performance is poor with large data sets.</p>
<h2 id="1052-adaptive-search">10.5.2 &nbsp; Adaptive search<a class="headerlink" href="#1052-adaptive-search" title="Permanent link">&para;</a></h2>
<p>Adaptive search uses the unique properties of data (such as order) to optimize the search process, thereby locating the target element more efficiently.</p>
<p>An Adaptive search uses the unique properties of data (such as order) to optimize the search process, thereby locating the target element more efficiently.</p>
<ul>
<li>"Binary search" uses the orderliness of data to achieve efficient searching, only suitable for arrays.</li>
<li>"Hash search" uses a hash table to establish a key-value mapping between search data and target data, thus implementing the query operation.</li>
<li>"Tree search" in a specific tree structure (such as a binary search tree), quickly eliminates nodes based on node value comparisons, thus locating the target element.</li>
</ul>
<p>The advantage of these algorithms is high efficiency, <strong>with time complexities reaching <span class="arithmatex">\(O(\log n)\)</span> or even <span class="arithmatex">\(O(1)\)</span></strong>.</p>
<p>However, <strong>using these algorithms often requires data preprocessing</strong>. For example, binary search requires sorting the array in advance, and hash search and tree search both require the help of additional data structures, maintaining these structures also requires extra time and space overhead.</p>
<p>However, <strong>using these algorithms often requires data preprocessing</strong>. For example, binary search requires sorting the array in advance, and hash search and tree search both require the help of additional data structures. Maintaining these structures also requires more overhead in terms of time and space.</p>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>Adaptive search algorithms are often referred to as search algorithms, <strong>mainly used for quickly retrieving target elements in specific data structures</strong>.</p>
</div>
<h2 id="1053-choosing-a-search-method">10.5.3 &nbsp; Choosing a search method<a class="headerlink" href="#1053-choosing-a-search-method" title="Permanent link">&para;</a></h2>
<p>Given a set of data of size <span class="arithmatex">\(n\)</span>, we can use linear search, binary search, tree search, hash search, and other methods to search for the target element from it. The working principles of these methods are shown in Figure 10-11.</p>
<p>Given a set of data of size <span class="arithmatex">\(n\)</span>, we can use a linear search, binary search, tree search, hash search, or other methods to retrieve the target element. The working principles of these methods are shown in Figure 10-11.</p>
<p><a class="glightbox" href="../searching_algorithm_revisited.assets/searching_algorithms.png" data-type="image" data-width="100%" data-height="auto" data-desc-position="bottom"><img alt="Various search strategies" class="animation-figure" src="../searching_algorithm_revisited.assets/searching_algorithms.png" /></a></p>
<p align="center"> Figure 10-11 &nbsp; Various search strategies </p>
<p>The operation efficiency and characteristics of the aforementioned methods are shown in the following table.</p>
<p>The characteristics and operational efficiency of the aforementioned methods are shown in the following table.</p>
<p align="center"> Table 10-1 &nbsp; Comparison of search algorithm efficiency </p>
<div class="center-table">
@ -3695,22 +3695,22 @@
</tbody>
</table>
</div>
<p>The choice of search algorithm also depends on the volume of data, search performance requirements, data query and update frequency, etc.</p>
<p>The choice of search algorithm also depends on the volume of data, search performance requirements, frequency of data queries and updates, etc.</p>
<p><strong>Linear search</strong></p>
<ul>
<li>Good versatility, no need for any data preprocessing operations. If we only need to query the data once, then the time for data preprocessing in the other three methods would be longer than the time for linear search.</li>
<li>Good versatility, no need for any data preprocessing operations. If we only need to query the data once, then the time for data preprocessing in the other three methods would be longer than the time for a linear search.</li>
<li>Suitable for small volumes of data, where time complexity has a smaller impact on efficiency.</li>
<li>Suitable for scenarios with high data update frequency, because this method does not require any additional maintenance of the data.</li>
<li>Suitable for scenarios with very frequent data updates, because this method does not require any additional maintenance of the data.</li>
</ul>
<p><strong>Binary search</strong></p>
<ul>
<li>Suitable for large data volumes, with stable efficiency performance, the worst time complexity being <span class="arithmatex">\(O(\log n)\)</span>.</li>
<li>The data volume cannot be too large, because storing arrays requires contiguous memory space.</li>
<li>Not suitable for scenarios with frequent additions and deletions, because maintaining an ordered array incurs high overhead.</li>
<li>Suitable for larger data volumes, with stable performance and a worst-case time complexity of <span class="arithmatex">\(O(\log n)\)</span>.</li>
<li>However, the data volume cannot be too large, because storing arrays requires contiguous memory space.</li>
<li>Not suitable for scenarios with frequent additions and deletions, because maintaining an ordered array incurs a lot of overhead.</li>
</ul>
<p><strong>Hash search</strong></p>
<ul>
<li>Suitable for scenarios with high query performance requirements, with an average time complexity of <span class="arithmatex">\(O(1)\)</span>.</li>
<li>Suitable for scenarios where fast query performance is essential, with an average time complexity of <span class="arithmatex">\(O(1)\)</span>.</li>
<li>Not suitable for scenarios needing ordered data or range searches, because hash tables cannot maintain data orderliness.</li>
<li>High dependency on hash functions and hash collision handling strategies, with significant performance degradation risks.</li>
<li>Not suitable for overly large data volumes, because hash tables need extra space to minimize collisions and provide good query performance.</li>
@ -3719,7 +3719,7 @@
<ul>
<li>Suitable for massive data, because tree nodes are stored scattered in memory.</li>
<li>Suitable for maintaining ordered data or range searches.</li>
<li>In the continuous addition and deletion of nodes, the binary search tree may become skewed, degrading the time complexity to <span class="arithmatex">\(O(n)\)</span>.</li>
<li>With the continuous addition and deletion of nodes, the binary search tree may become skewed, degrading the time complexity to <span class="arithmatex">\(O(n)\)</span>.</li>
<li>If using AVL trees or red-black trees, operations can run stably at <span class="arithmatex">\(O(\log n)\)</span> efficiency, but the operation to maintain tree balance adds extra overhead.</li>
</ul>

View File

@ -4093,7 +4093,7 @@
<a id="__codelineno-13-61" name="__codelineno-13-61" href="#__codelineno-13-61"></a> <span class="n">val</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_front</span><span class="o">.</span><span class="n">val</span> <span class="c1"># Temporarily store the head node value</span>
<a id="__codelineno-13-62" name="__codelineno-13-62" href="#__codelineno-13-62"></a> <span class="c1"># Remove head node</span>
<a id="__codelineno-13-63" name="__codelineno-13-63" href="#__codelineno-13-63"></a> <span class="n">fnext</span><span class="p">:</span> <span class="n">ListNode</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_front</span><span class="o">.</span><span class="n">next</span>
<a id="__codelineno-13-64" name="__codelineno-13-64" href="#__codelineno-13-64"></a> <span class="k">if</span> <span class="n">fnext</span> <span class="o">!=</span> <span class="kc">None</span><span class="p">:</span>
<a id="__codelineno-13-64" name="__codelineno-13-64" href="#__codelineno-13-64"></a> <span class="k">if</span> <span class="n">fnext</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<a id="__codelineno-13-65" name="__codelineno-13-65" href="#__codelineno-13-65"></a> <span class="n">fnext</span><span class="o">.</span><span class="n">prev</span> <span class="o">=</span> <span class="kc">None</span>
<a id="__codelineno-13-66" name="__codelineno-13-66" href="#__codelineno-13-66"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_front</span><span class="o">.</span><span class="n">next</span> <span class="o">=</span> <span class="kc">None</span>
<a id="__codelineno-13-67" name="__codelineno-13-67" href="#__codelineno-13-67"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_front</span> <span class="o">=</span> <span class="n">fnext</span> <span class="c1"># Update head node</span>
@ -4102,7 +4102,7 @@
<a id="__codelineno-13-70" name="__codelineno-13-70" href="#__codelineno-13-70"></a> <span class="n">val</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_rear</span><span class="o">.</span><span class="n">val</span> <span class="c1"># Temporarily store the tail node value</span>
<a id="__codelineno-13-71" name="__codelineno-13-71" href="#__codelineno-13-71"></a> <span class="c1"># Remove tail node</span>
<a id="__codelineno-13-72" name="__codelineno-13-72" href="#__codelineno-13-72"></a> <span class="n">rprev</span><span class="p">:</span> <span class="n">ListNode</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_rear</span><span class="o">.</span><span class="n">prev</span>
<a id="__codelineno-13-73" name="__codelineno-13-73" href="#__codelineno-13-73"></a> <span class="k">if</span> <span class="n">rprev</span> <span class="o">!=</span> <span class="kc">None</span><span class="p">:</span>
<a id="__codelineno-13-73" name="__codelineno-13-73" href="#__codelineno-13-73"></a> <span class="k">if</span> <span class="n">rprev</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<a id="__codelineno-13-74" name="__codelineno-13-74" href="#__codelineno-13-74"></a> <span class="n">rprev</span><span class="o">.</span><span class="n">next</span> <span class="o">=</span> <span class="kc">None</span>
<a id="__codelineno-13-75" name="__codelineno-13-75" href="#__codelineno-13-75"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_rear</span><span class="o">.</span><span class="n">prev</span> <span class="o">=</span> <span class="kc">None</span>
<a id="__codelineno-13-76" name="__codelineno-13-76" href="#__codelineno-13-76"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_rear</span> <span class="o">=</span> <span class="n">rprev</span> <span class="c1"># Update tail node</span>

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>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_appendix/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_appendix/contribution/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_appendix/installation/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_appendix/terminology/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_array_and_linkedlist/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_array_and_linkedlist/array/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_array_and_linkedlist/linked_list/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_array_and_linkedlist/list/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_array_and_linkedlist/ram_and_cache/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_array_and_linkedlist/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_backtracking/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_backtracking/backtracking_algorithm/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_backtracking/n_queens_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_backtracking/permutations_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_backtracking/subset_sum_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_backtracking/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_computational_complexity/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_computational_complexity/iteration_and_recursion/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_computational_complexity/performance_evaluation/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_computational_complexity/space_complexity/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_computational_complexity/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_computational_complexity/time_complexity/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_data_structure/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_data_structure/basic_data_types/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_data_structure/character_encoding/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_data_structure/classification_of_data_structure/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_data_structure/number_encoding/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_data_structure/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_divide_and_conquer/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_divide_and_conquer/binary_search_recur/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_divide_and_conquer/build_binary_tree_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_divide_and_conquer/divide_and_conquer/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_divide_and_conquer/hanota_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_divide_and_conquer/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_dynamic_programming/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_dynamic_programming/dp_problem_features/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_dynamic_programming/dp_solution_pipeline/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_dynamic_programming/edit_distance_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_dynamic_programming/intro_to_dynamic_programming/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_dynamic_programming/knapsack_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_dynamic_programming/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_dynamic_programming/unbounded_knapsack_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_graph/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_graph/graph/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_graph/graph_operations/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_graph/graph_traversal/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_graph/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_greedy/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_greedy/fractional_knapsack_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_greedy/greedy_algorithm/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_greedy/max_capacity_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_greedy/max_product_cutting_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_greedy/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_hashing/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_hashing/hash_algorithm/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_hashing/hash_collision/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_hashing/hash_map/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_hashing/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_heap/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_heap/build_heap/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_heap/heap/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_heap/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_heap/top_k/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_hello_algo/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_introduction/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_introduction/algorithms_are_everywhere/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_introduction/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_introduction/what_is_dsa/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_preface/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_preface/about_the_book/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_preface/suggestions/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_preface/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_reference/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_searching/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_searching/binary_search/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_searching/binary_search_edge/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_searching/binary_search_insertion/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_searching/replace_linear_by_hashing/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_searching/searching_algorithm_revisited/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_searching/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_sorting/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_sorting/bubble_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_sorting/bucket_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_sorting/counting_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_sorting/heap_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_sorting/insertion_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_sorting/merge_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_sorting/quick_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_sorting/radix_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_sorting/selection_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_sorting/sorting_algorithm/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_sorting/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_stack_and_queue/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_stack_and_queue/deque/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_stack_and_queue/queue/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_stack_and_queue/stack/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_stack_and_queue/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_tree/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_tree/array_representation_of_tree/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_tree/avl_tree/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_tree/binary_search_tree/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_tree/binary_tree/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_tree/binary_tree_traversal/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_tree/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>

Binary file not shown.

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>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_appendix/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_appendix/contribution/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_appendix/installation/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_appendix/terminology/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_array_and_linkedlist/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_array_and_linkedlist/array/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_array_and_linkedlist/linked_list/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_array_and_linkedlist/list/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_array_and_linkedlist/ram_and_cache/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_array_and_linkedlist/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_backtracking/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_backtracking/backtracking_algorithm/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_backtracking/n_queens_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_backtracking/permutations_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_backtracking/subset_sum_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_backtracking/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_computational_complexity/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_computational_complexity/iteration_and_recursion/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_computational_complexity/performance_evaluation/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_computational_complexity/space_complexity/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_computational_complexity/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_computational_complexity/time_complexity/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_data_structure/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_data_structure/basic_data_types/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_data_structure/character_encoding/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_data_structure/classification_of_data_structure/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_data_structure/number_encoding/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_data_structure/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_divide_and_conquer/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_divide_and_conquer/binary_search_recur/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_divide_and_conquer/build_binary_tree_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_divide_and_conquer/divide_and_conquer/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_divide_and_conquer/hanota_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_divide_and_conquer/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_dynamic_programming/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_dynamic_programming/dp_problem_features/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_dynamic_programming/dp_solution_pipeline/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_dynamic_programming/edit_distance_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_dynamic_programming/intro_to_dynamic_programming/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_dynamic_programming/knapsack_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_dynamic_programming/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_dynamic_programming/unbounded_knapsack_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_graph/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_graph/graph/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_graph/graph_operations/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_graph/graph_traversal/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_graph/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_greedy/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_greedy/fractional_knapsack_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_greedy/greedy_algorithm/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_greedy/max_capacity_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_greedy/max_product_cutting_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_greedy/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_hashing/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_hashing/hash_algorithm/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_hashing/hash_collision/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_hashing/hash_map/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_hashing/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_heap/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_heap/build_heap/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_heap/heap/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_heap/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_heap/top_k/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_hello_algo/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_introduction/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_introduction/algorithms_are_everywhere/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_introduction/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_introduction/what_is_dsa/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_paperbook/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_preface/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_preface/about_the_book/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_preface/suggestions/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_preface/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_reference/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_searching/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_searching/binary_search/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_searching/binary_search_edge/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_searching/binary_search_insertion/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_searching/replace_linear_by_hashing/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_searching/searching_algorithm_revisited/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_searching/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/bubble_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/bucket_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/counting_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/heap_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/insertion_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/merge_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/quick_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/radix_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/selection_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/sorting_algorithm/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_stack_and_queue/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_stack_and_queue/deque/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_stack_and_queue/queue/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_stack_and_queue/stack/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_stack_and_queue/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_tree/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_tree/array_representation_of_tree/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_tree/avl_tree/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_tree/binary_search_tree/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_tree/binary_tree/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_tree/binary_tree_traversal/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_tree/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>

Binary file not shown.

View File

@ -4032,7 +4032,7 @@ dp[i, j] = \min(dp[i-1, j], dp[i, j-1]) + grid[i, j]
<p><a class="glightbox" href="../dp_solution_pipeline.assets/min_path_sum_dfs.png" data-type="image" data-width="100%" data-height="auto" data-desc-position="bottom"><img alt="暴力搜尋遞迴樹" class="animation-figure" src="../dp_solution_pipeline.assets/min_path_sum_dfs.png" /></a></p>
<p align="center"> 圖 14-14 &nbsp; 暴力搜尋遞迴樹 </p>
<p>每個狀態都有向下和向右兩種選擇,從左上角走到右下角總共需要 <span class="arithmatex">\(m + n - 2\)</span> 步,所以最差時間複雜度為 <span class="arithmatex">\(O(2^{m + n})\)</span> 。請注意,這種計算方式未考慮臨近網格邊界的情況,當到達網路邊界時只剩下一種選擇,因此實際的路徑數量會少一些。</p>
<p>每個狀態都有向下和向右兩種選擇,從左上角走到右下角總共需要 <span class="arithmatex">\(m + n - 2\)</span> 步,所以最差時間複雜度為 <span class="arithmatex">\(O(2^{m + n})\)</span> ,其中 <span class="arithmatex">\(n\)</span><span class="arithmatex">\(m\)</span> 分別為網格的行數和列數。請注意,這種計算方式未考慮臨近網格邊界的情況,當到達網路邊界時只剩下一種選擇,因此實際的路徑數量會少一些。</p>
<h3 id="2">2. &nbsp; 方法二:記憶化搜尋<a class="headerlink" href="#2" title="Permanent link">&para;</a></h3>
<p>我們引入一個和網格 <code>grid</code> 相同尺寸的記憶串列 <code>mem</code> ,用於記錄各個子問題的解,並將重疊子問題進行剪枝:</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>

View File

@ -3594,7 +3594,7 @@
<h1 id="117">11.7 &nbsp; 堆積排序<a class="headerlink" href="#117" title="Permanent link">&para;</a></h1>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>閱讀本節前,請確保已學完“堆積章節。</p>
<p>閱讀本節前,請確保已學完“堆積章節。</p>
</div>
<p><u>堆積排序heap sort</u>是一種基於堆積資料結構實現的高效排序演算法。我們可以利用已經學過的“建堆積操作”和“元素出堆積操作”實現堆積排序。</p>
<ol>

View File

@ -4153,7 +4153,7 @@
<a id="__codelineno-14-61" name="__codelineno-14-61" href="#__codelineno-14-61"></a> <span class="n">val</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_front</span><span class="o">.</span><span class="n">val</span> <span class="c1"># 暫存頭節點值</span>
<a id="__codelineno-14-62" name="__codelineno-14-62" href="#__codelineno-14-62"></a> <span class="c1"># 刪除頭節點</span>
<a id="__codelineno-14-63" name="__codelineno-14-63" href="#__codelineno-14-63"></a> <span class="n">fnext</span><span class="p">:</span> <span class="n">ListNode</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_front</span><span class="o">.</span><span class="n">next</span>
<a id="__codelineno-14-64" name="__codelineno-14-64" href="#__codelineno-14-64"></a> <span class="k">if</span> <span class="n">fnext</span> <span class="o">!=</span> <span class="kc">None</span><span class="p">:</span>
<a id="__codelineno-14-64" name="__codelineno-14-64" href="#__codelineno-14-64"></a> <span class="k">if</span> <span class="n">fnext</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<a id="__codelineno-14-65" name="__codelineno-14-65" href="#__codelineno-14-65"></a> <span class="n">fnext</span><span class="o">.</span><span class="n">prev</span> <span class="o">=</span> <span class="kc">None</span>
<a id="__codelineno-14-66" name="__codelineno-14-66" href="#__codelineno-14-66"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_front</span><span class="o">.</span><span class="n">next</span> <span class="o">=</span> <span class="kc">None</span>
<a id="__codelineno-14-67" name="__codelineno-14-67" href="#__codelineno-14-67"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_front</span> <span class="o">=</span> <span class="n">fnext</span> <span class="c1"># 更新頭節點</span>
@ -4162,7 +4162,7 @@
<a id="__codelineno-14-70" name="__codelineno-14-70" href="#__codelineno-14-70"></a> <span class="n">val</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_rear</span><span class="o">.</span><span class="n">val</span> <span class="c1"># 暫存尾節點值</span>
<a id="__codelineno-14-71" name="__codelineno-14-71" href="#__codelineno-14-71"></a> <span class="c1"># 刪除尾節點</span>
<a id="__codelineno-14-72" name="__codelineno-14-72" href="#__codelineno-14-72"></a> <span class="n">rprev</span><span class="p">:</span> <span class="n">ListNode</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_rear</span><span class="o">.</span><span class="n">prev</span>
<a id="__codelineno-14-73" name="__codelineno-14-73" href="#__codelineno-14-73"></a> <span class="k">if</span> <span class="n">rprev</span> <span class="o">!=</span> <span class="kc">None</span><span class="p">:</span>
<a id="__codelineno-14-73" name="__codelineno-14-73" href="#__codelineno-14-73"></a> <span class="k">if</span> <span class="n">rprev</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<a id="__codelineno-14-74" name="__codelineno-14-74" href="#__codelineno-14-74"></a> <span class="n">rprev</span><span class="o">.</span><span class="n">next</span> <span class="o">=</span> <span class="kc">None</span>
<a id="__codelineno-14-75" name="__codelineno-14-75" href="#__codelineno-14-75"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_rear</span><span class="o">.</span><span class="n">prev</span> <span class="o">=</span> <span class="kc">None</span>
<a id="__codelineno-14-76" name="__codelineno-14-76" href="#__codelineno-14-76"></a> <span class="bp">self</span><span class="o">.</span><span class="n">_rear</span> <span class="o">=</span> <span class="n">rprev</span> <span class="c1"># 更新尾節點</span>

View File

@ -4198,6 +4198,8 @@
<a id="__codelineno-29-5" name="__codelineno-29-5" href="#__codelineno-29-5"></a><span class="n">P</span><span class="o">-&gt;</span><span class="n">left</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">n2</span><span class="p">;</span>
<a id="__codelineno-29-6" name="__codelineno-29-6" href="#__codelineno-29-6"></a><span class="c1">// 刪除節點 P</span>
<a id="__codelineno-29-7" name="__codelineno-29-7" href="#__codelineno-29-7"></a><span class="n">n1</span><span class="o">-&gt;</span><span class="n">left</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">n2</span><span class="p">;</span>
<a id="__codelineno-29-8" name="__codelineno-29-8" href="#__codelineno-29-8"></a><span class="c1">// 釋放記憶體</span>
<a id="__codelineno-29-9" name="__codelineno-29-9" href="#__codelineno-29-9"></a><span class="k">delete</span><span class="w"> </span><span class="n">P</span><span class="p">;</span>
</code></pre></div>
</div>
<div class="tabbed-block">
@ -4285,6 +4287,8 @@
<a id="__codelineno-38-5" name="__codelineno-38-5" href="#__codelineno-38-5"></a><span class="n">P</span><span class="o">-&gt;</span><span class="n">left</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">n2</span><span class="p">;</span>
<a id="__codelineno-38-6" name="__codelineno-38-6" href="#__codelineno-38-6"></a><span class="c1">// 刪除節點 P</span>
<a id="__codelineno-38-7" name="__codelineno-38-7" href="#__codelineno-38-7"></a><span class="n">n1</span><span class="o">-&gt;</span><span class="n">left</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">n2</span><span class="p">;</span>
<a id="__codelineno-38-8" name="__codelineno-38-8" href="#__codelineno-38-8"></a><span class="c1">// 釋放記憶體</span>
<a id="__codelineno-38-9" name="__codelineno-38-9" href="#__codelineno-38-9"></a><span class="n">free</span><span class="p">(</span><span class="n">P</span><span class="p">);</span>
</code></pre></div>
</div>
<div class="tabbed-block">

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>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_appendix/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_appendix/contribution/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_appendix/installation/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_appendix/terminology/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_array_and_linkedlist/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_array_and_linkedlist/array/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_array_and_linkedlist/linked_list/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_array_and_linkedlist/list/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_array_and_linkedlist/ram_and_cache/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_array_and_linkedlist/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_backtracking/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_backtracking/backtracking_algorithm/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_backtracking/n_queens_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_backtracking/permutations_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_backtracking/subset_sum_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_backtracking/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_computational_complexity/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_computational_complexity/iteration_and_recursion/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_computational_complexity/performance_evaluation/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_computational_complexity/space_complexity/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_computational_complexity/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_computational_complexity/time_complexity/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_data_structure/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_data_structure/basic_data_types/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_data_structure/character_encoding/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_data_structure/classification_of_data_structure/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_data_structure/number_encoding/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_data_structure/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_divide_and_conquer/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_divide_and_conquer/binary_search_recur/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_divide_and_conquer/build_binary_tree_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_divide_and_conquer/divide_and_conquer/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_divide_and_conquer/hanota_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_divide_and_conquer/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_dynamic_programming/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_dynamic_programming/dp_problem_features/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_dynamic_programming/dp_solution_pipeline/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_dynamic_programming/edit_distance_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_dynamic_programming/intro_to_dynamic_programming/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_dynamic_programming/knapsack_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_dynamic_programming/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_dynamic_programming/unbounded_knapsack_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_graph/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_graph/graph/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_graph/graph_operations/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_graph/graph_traversal/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_graph/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_greedy/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_greedy/fractional_knapsack_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_greedy/greedy_algorithm/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_greedy/max_capacity_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_greedy/max_product_cutting_problem/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_greedy/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_hashing/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_hashing/hash_algorithm/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_hashing/hash_collision/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_hashing/hash_map/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_hashing/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_heap/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_heap/build_heap/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_heap/heap/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_heap/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_heap/top_k/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_hello_algo/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_introduction/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_introduction/algorithms_are_everywhere/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_introduction/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_introduction/what_is_dsa/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_preface/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_preface/about_the_book/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_preface/suggestions/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_preface/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_reference/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_searching/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_searching/binary_search/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_searching/binary_search_edge/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_searching/binary_search_insertion/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_searching/replace_linear_by_hashing/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_searching/searching_algorithm_revisited/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_searching/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_sorting/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_sorting/bubble_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_sorting/bucket_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_sorting/counting_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_sorting/heap_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_sorting/insertion_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_sorting/merge_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_sorting/quick_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_sorting/radix_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_sorting/selection_sort/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_sorting/sorting_algorithm/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_sorting/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_stack_and_queue/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_stack_and_queue/deque/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_stack_and_queue/queue/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_stack_and_queue/stack/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_stack_and_queue/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_tree/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_tree/array_representation_of_tree/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_tree/avl_tree/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_tree/binary_search_tree/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_tree/binary_tree/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_tree/binary_tree_traversal/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/zh-hant/chapter_tree/summary/</loc>
<lastmod>2025-01-14</lastmod>
<lastmod>2025-01-21</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>

Binary file not shown.