gh-pages
krahets 10 months ago
parent 183f12fcf5
commit edb3fe6d8c

@ -4135,7 +4135,7 @@
<li><strong>复杂度的常数系数小</strong>:在上述三种算法中,快速排序的比较、赋值、交换等操作的总数量最少。这与“插入排序”比“冒泡排序”更快的原因类似。</li>
</ul>
<h2 id="1154">11.5.4 &nbsp; 基准数优化<a class="headerlink" href="#1154" title="Permanent link">&para;</a></h2>
<p><strong>快速排序在某些输入下的时间效率可能降低</strong>。举一个极端例子,假设输入数组是完全倒序的,由于我们选择最左端元素作为基准数,那么在哨兵划分完成后,基准数被交换至数组最右端,导致左子数组长度为 <span class="arithmatex">\(n - 1\)</span>、右子数组长度为 <span class="arithmatex">\(0\)</span> 。如此递归下去,每轮哨兵划分后的右子数组长度都<span class="arithmatex">\(0\)</span> ,分治策略失效,快速排序退化为“冒泡排序”。</p>
<p><strong>快速排序在某些输入下的时间效率可能降低</strong>。举一个极端例子,假设输入数组是完全倒序的,由于我们选择最左端元素作为基准数,那么在哨兵划分完成后,基准数被交换至数组最右端,导致左子数组长度为 <span class="arithmatex">\(n - 1\)</span>、右子数组长度为 <span class="arithmatex">\(0\)</span> 。如此递归下去,每轮哨兵划分后都有一个子数组的长度<span class="arithmatex">\(0\)</span> ,分治策略失效,快速排序退化为“冒泡排序”的近似形式</p>
<p>为了尽量避免这种情况发生,<strong>我们可以优化哨兵划分中的基准数的选取策略</strong>。例如,我们可以随机选取一个元素作为基准数。然而,如果运气不佳,每次都选到不理想的基准数,效率仍然不尽如人意。</p>
<p>需要注意的是,编程语言通常生成的是“伪随机数”。如果我们针对伪随机数序列构建一个特定的测试样例,那么快速排序的效率仍然可能劣化。</p>
<p>为了进一步改进,我们可以在数组中选取三个候选元素(通常为数组的首、尾、中点元素),<strong>并将这三个候选元素的中位数作为基准数</strong>。这样一来,基准数“既不太小也不太大”的概率将大幅提升。当然,我们还可以选取更多候选元素,以进一步提高算法的稳健性。采用这种方法后,时间复杂度劣化至 <span class="arithmatex">\(O(n^2)\)</span> 的概率大大降低。</p>

@ -2,162 +2,162 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.hello-algo.com/en/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_array_and_linkedlist/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_array_and_linkedlist/array/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_array_and_linkedlist/linked_list/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_array_and_linkedlist/list/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_array_and_linkedlist/ram_and_cache/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_array_and_linkedlist/summary/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_computational_complexity/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_computational_complexity/iteration_and_recursion/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_computational_complexity/performance_evaluation/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_computational_complexity/space_complexity/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_computational_complexity/summary/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_computational_complexity/time_complexity/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_data_structure/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_data_structure/basic_data_types/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_data_structure/character_encoding/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_data_structure/classification_of_data_structure/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_data_structure/number_encoding/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_data_structure/summary/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_introduction/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_introduction/algorithms_are_everywhere/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_introduction/summary/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_introduction/what_is_dsa/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_preface/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_preface/about_the_book/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_preface/suggestions/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_preface/summary/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_stack_and_queue/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_stack_and_queue/deque/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_stack_and_queue/queue/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_stack_and_queue/stack/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/en/chapter_stack_and_queue/summary/</loc>
<lastmod>2024-01-22</lastmod>
<lastmod>2024-01-23</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>

Binary file not shown.

@ -112,6 +112,11 @@
text-transform: none;
}
.md-typeset a:hover {
color: var(--md-typeset-a-color);
text-decoration: underline;
}
.md-typeset code {
border-radius: 0.2rem;
}
@ -150,34 +155,6 @@ body {
width: 100%; /* Default to full width */
}
/* rounded button */
.rounded-button {
display: inline-flex; /* Use flexbox for alignment */
align-items: center; /* Align items vertically */
justify-content: center; /* Center items horizontally */
border-radius: 100px; /* Circular corners */
padding: 9px 18px; /* Padding around the text */
margin: 0.15em 0;
border: none; /* Removes default border */
background-color: var(--md-typeset-btn-color); /* Background color */
color: var(--md-primary-fg-color) !important; /* Text color */
font-size: 0.85em; /* Font size */
text-align: center; /* Center the text */
text-decoration: none; /* Remove underline from anchor text */
cursor: pointer; /* Pointer cursor on hover */
}
.rounded-button:hover {
background-color: var(--md-typeset-btn-hover-color);
}
.rounded-button svg {
fill: var(--md-primary-fg-color); /* Fill SVG icon with text color */
width: 1.2em;
height: auto;
margin-right: 0.5em; /* Add some space between the SVG icon and the text */
}
/* Admonition for python tutor */
.md-typeset .admonition.pythontutor,
.md-typeset details.pythontutor {
@ -237,10 +214,69 @@ body {
max-width: 70vw;
}
.hero-btn {
/* rounded button */
.rounded-button {
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 10em;
margin: 0 0.1em;
padding: 0.5em 1.3em;
font-size: 0.85em;
border: none;
background-color: var(--md-typeset-btn-color);
color: var(--md-primary-fg-color) !important;
text-align: center;
text-decoration: none;
cursor: pointer;
}
.rounded-button:hover {
background-color: var(--md-typeset-btn-hover-color);
}
.rounded-button p {
margin: 0;
margin-bottom: 0.1em;
}
.rounded-button svg {
fill: var(--md-primary-fg-color);
width: auto;
height: 1.2em;
margin-right: 0.5em;
}
/* text button */
.text-button-container {
width: 100%;
display: flex;
flex-direction: row;
justify-content: center;
height: auto;
margin: 0 auto;
}
.text-button {
display: flex;
flex-direction: row;
align-items: center;
color: var(--md-typeset-btn-color);
text-decoration: none;
margin: 0 1em;
}
.text-button:hover {
text-decoration: underline;
}
.text-button svg {
display: inline-block;
fill: var(--md-typeset-btn-color);
width: auto;
height: 0.9em;
background-size: cover;
padding-top: 0.17em;
margin-left: 0.4em;
}
/* hero image */
@ -284,8 +320,8 @@ a:hover .hero-on-hover {
}
a:hover .hero-caption {
text-decoration: underline;
color: var(--md-typeset-btn-color);
font-weight: bold;
}
/* code badge */

@ -238,53 +238,6 @@
<!-- background -->
<img src="assets/hero/universe_bg.png" class="hero-bg">
<!-- heading and buttons -->
<div style="width: 100%; position: absolute; transform: translateX(-50%); left: 50%; bottom: min(2vh, 3vw);">
<img style="height: min(9vh, 12vw);"
src="https://readme-typing-svg.demolab.com/?font=Noto+Sans+SC&weight=400&duration=3500&pause=2000&color=FFF&center=true&vCenter=true&random=false&width=200&lines=Hello%2C+%E7%AE%97%E6%B3%95+!"
alt="hello-algo-typing-svg" />
<p style="color: #fff; margin-top: max(-0.6vh, -1.2vw); margin-bottom: min(2.5vh, 4vw);">
动画图解、一键运行的数据结构与算法教程
</p>
<div>
<a href="https://www.hello-algo.com/chapter_preface/" class="rounded-button hero-btn">
<svg xmlns="http://www.w3.org/2000/svg" height="16px" width="15.5px"
viewBox="0 0 576 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2023 Fonticons, Inc.-->
<path
d="M249.6 471.5c10.8 3.8 22.4-4.1 22.4-15.5V78.6c0-4.2-1.6-8.4-5-11C247.4 52 202.4 32 144 32C93.5 32 46.3 45.3 18.1 56.1C6.8 60.5 0 71.7 0 83.8V454.1c0 11.9 12.8 20.2 24.1 16.5C55.6 460.1 105.5 448 144 448c33.9 0 79 14 105.6 23.5zm76.8 0C353 462 398.1 448 432 448c38.5 0 88.4 12.1 119.9 22.6c11.3 3.8 24.1-4.6 24.1-16.5V83.8c0-12.1-6.8-23.3-18.1-27.6C529.7 45.3 482.5 32 432 32c-58.4 0-103.4 20-123 35.6c-3.3 2.6-5 6.8-5 11V456c0 11.4 11.7 19.3 22.4 15.5z">
</path>
</svg>
开始阅读
</a>
<a href="https://github.com/krahets/hello-algo" class="rounded-button hero-btn">
<svg xmlns="http://www.w3.org/2000/svg" height="16px" width="15.5px"
viewBox="0 0 496 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2023 Fonticons, Inc.-->
<path
d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z">
</path>
</svg>
代码仓库
</a>
<a href="https://github.com/krahets/hello-algo/releases" class="rounded-button hero-btn">
<svg xmlns="http://www.w3.org/2000/svg" height="16px" width="15.5px"
viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2023 Fonticons, Inc.-->
<path
d="M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 144-208 0c-35.3 0-64 28.7-64 64l0 144-48 0c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128zM176 352l32 0c30.9 0 56 25.1 56 56s-25.1 56-56 56l-16 0 0 32c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48 0-80c0-8.8 7.2-16 16-16zm32 80c13.3 0 24-10.7 24-24s-10.7-24-24-24l-16 0 0 48 16 0zm96-80l32 0c26.5 0 48 21.5 48 48l0 64c0 26.5-21.5 48-48 48l-32 0c-8.8 0-16-7.2-16-16l0-128c0-8.8 7.2-16 16-16zm32 128c8.8 0 16-7.2 16-16l0-64c0-8.8-7.2-16-16-16l-16 0 0 96 16 0zm80-112c0-8.8 7.2-16 16-16l48 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 32 32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 48c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-64 0-64z">
</path>
</svg>
下载 PDF
</a>
</div>
<!-- arrow -->
<div style="text-align: center; margin-top: min(2.5vh, 3.5vw);">
<svg xmlns="http://www.w3.org/2000/svg" fill="var(--md-default-fg-color)" height="2vh" width="auto"
viewBox="0 0 384 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
<path
d="M169.4 470.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 370.8 224 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 306.7L54.6 265.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z" />
</svg>
</div>
</div>
<!-- hero image -->
<div class="hero-image-div">
<!-- planets -->
@ -292,76 +245,113 @@
style="position: absolute; width: auto; height: 26.445%; left: 28.211%; top: 54.145%;">
<img src="assets/hero/links.png"
style="position: absolute; width: auto; height: 78.751%; left: 10.545%; top: 7.326%;">
<a href="https://www.hello-algo.com/chapter_introduction/">
<a href="/chapter_introduction/">
<img class="hero-on-hover" src="assets/hero/astronaut.png" style="height: 46.673%; left: 35.413%; top: 24.343%;">
<p class="hero-caption" style="left: 52.244%; top: 20.919%;">初识算法</p>
</a>
<a href="https://www.hello-algo.com/chapter_computational_complexity/">
<a href="/chapter_computational_complexity/">
<img class="hero-on-hover" src="assets/hero/chapter_computational_complexity.png"
style="height: 12.347%; left: 36.267%; top: 37.653%;">
<p class="hero-caption" style="left: 39.244%; top: 33.919%;">复杂度</p>
</a>
<a href="https://www.hello-algo.com/chapter_array_and_linkedlist/">
<a href="/chapter_array_and_linkedlist/">
<img class="hero-on-hover" src="assets/hero/chapter_array_and_linkedlist.png"
style="height: 22.242%; left: 73.242%; top: 52.481%;">
<p class="hero-caption" style="left: 90.897%; top: 76.259%;">数组与链表</p>
</a>
<a href="https://www.hello-algo.com/chapter_stack_and_queue/">
<a href="/chapter_stack_and_queue/">
<img class="hero-on-hover" src="assets/hero/chapter_stack_and_queue.png"
style="height: 14.302%; left: 62.646%; top: 77.875%;">
<p class="hero-caption" style="left: 78.371%; top: 90.25%;">栈与队列</p>
</a>
<a href="https://www.hello-algo.com/chapter_hashing/">
<a href="/chapter_hashing/">
<img class="hero-on-hover" src="assets/hero/chapter_hashing.png"
style="height: 15.266%; left: 63.281%; top: 27.933%;">
<p class="hero-caption" style="left: 68.862%; top: 46.292%;">哈希表</p>
</a>
<a href="https://www.hello-algo.com/chapter_tree/">
<a href="/chapter_tree/">
<img class="hero-on-hover" src="assets/hero/chapter_tree.png"
style="height: 19.615%; left: 80.137%; top: 26.678%;">
<p class="hero-caption" style="left: 96.159%; top: 44.8%;"></p>
</a>
<a href="https://www.hello-algo.com/chapter_heap/">
<a href="/chapter_heap/">
<img class="hero-on-hover" src="assets/hero/chapter_heap.png"
style="height: 10.566%; left: 77.226%; top: 11.559%;">
<p class="hero-caption" style="left: 88.103%; top: 15.422%;"></p>
</a>
<a href="https://www.hello-algo.com/chapter_graph/">
<a href="/chapter_graph/">
<img class="hero-on-hover" src="assets/hero/chapter_graph.png"
style="height: 16.112%; left: 51.854%; top: 5.575%;">
<p class="hero-caption" style="left: 71.195%; top: 6.503%;"></p>
</a>
<a href="https://www.hello-algo.com/chapter_searching/">
<a href="/chapter_searching/">
<img class="hero-on-hover" src="assets/hero/chapter_searching.png"
style="height: 15.149%; left: 18.185%; top: 16.404%;">
<p class="hero-caption" style="left: 14.556%; top: 20.876%;">搜索</p>
</a>
<a href="https://www.hello-algo.com/chapter_sorting/">
<a href="/chapter_sorting/">
<img class="hero-on-hover" src="assets/hero/chapter_sorting.png"
style="height: 9.574%; left: 25.409%; top: 40.747%;">
<p class="hero-caption" style="left: 28.805%; top: 53.808%;">排序</p>
</a>
<a href="https://www.hello-algo.com/chapter_divide_and_conquer/">
<a href="/chapter_divide_and_conquer/">
<img class="hero-on-hover" src="assets/hero/chapter_divide_and_conquer.png"
style="height: 18.681%; left: 32.721%; top: 4.816%;">
<p class="hero-caption" style="left: 31.42%; top: 8.679%;">分治</p>
</a>
<a href="https://www.hello-algo.com/chapter_backtracking/">
<a href="/chapter_backtracking/">
<img class="hero-on-hover" src="assets/hero/chapter_backtracking.png"
style="height: 17.338%; left: 4.875%; top: 32.925%;">
<p class="hero-caption" style="left: 4.742%; top: 50.113%;">回溯</p>
</a>
<a href="https://www.hello-algo.com/chapter_dynamic_programming/">
<a href="/chapter_dynamic_programming/">
<img class="hero-on-hover" src="assets/hero/chapter_dynamic_programming.png"
style="height: 15.47%; left: 9.406%; top: 57.472%;">
<p class="hero-caption" style="left: 8.561%; top: 75.351%;">动态规划</p>
</a>
<a href="https://www.hello-algo.com/chapter_greedy/">
<a href="/chapter_greedy/">
<img class="hero-on-hover" src="assets/hero/chapter_greedy.png"
style="height: 14.127%; left: 23.132%; top: 75.803%;">
<p class="hero-caption" style="left: 21.619%; top: 86.85%;">贪心</p>
</a>
</div>
<!-- heading and buttons -->
<div style="width: 100%; position: absolute; transform: translateX(-50%); left: 50%; bottom: min(2vh, 3vw);">
<img style="height: min(9vh, 12vw);"
src="https://readme-typing-svg.demolab.com/?font=Noto+Sans+SC&weight=400&duration=3500&pause=2000&color=FFF&center=true&vCenter=true&random=false&width=200&lines=Hello%2C+%E7%AE%97%E6%B3%95+!"
alt="hello-algo-typing-svg" />
<p style="color: #fff; margin-top: max(-1vh, -2vw); margin-bottom: min(2vh, 3.5vw);">
动画图解、一键运行的数据结构与算法教程
</p>
<div>
<a href="/chapter_preface/" class="rounded-button">
<svg xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
<path
d="M160 96a96 96 0 1 1 192 0A96 96 0 1 1 160 96zm80 152V512l-48.4-24.2c-20.9-10.4-43.5-17-66.8-19.3l-96-9.6C12.5 457.2 0 443.5 0 427V224c0-17.7 14.3-32 32-32H62.3c63.6 0 125.6 19.6 177.7 56zm32 264V248c52.1-36.4 114.1-56 177.7-56H480c17.7 0 32 14.3 32 32V427c0 16.4-12.5 30.2-28.8 31.8l-96 9.6c-23.2 2.3-45.9 8.9-66.8 19.3L272 512z" />
</svg>
<p>开始阅读</p>
</a>
<a href="https://github.com/krahets/hello-algo" class="rounded-button">
<svg xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 496 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2023 Fonticons, Inc.-->
<path
d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z">
</path>
</svg>
<p>代码仓库</p>
</a>
</div>
<!-- arrow -->
<div style="text-align: center; margin-top: min(2.5vh, 3.5vw);">
<svg xmlns="http://www.w3.org/2000/svg" fill="var(--md-default-fg-color)" height="2vh" width="auto"
viewBox="0 0 384 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
<path
d="M169.4 470.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 370.8 224 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 306.7L54.6 265.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z" />
</svg>
</div>
</div>
</section>
<!-- Section: brief introduction -->
@ -401,6 +391,18 @@
<img class="device-on-hover" src="assets/hero/web_iphone.png" style="height: 57.27%; left: 2%; bottom: 0%;">
</div>
<p style="margin-top: 2em;">提供网页版和 PDF 版,兼容 PC、平板和手机随时随地阅读</p>
<div class="text-button-container">
<a href="https://github.com/krahets/hello-algo/releases">
<div class="text-button">
<p>下载 PDF</p>
<svg xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 320 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
<path
d="M278.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L210.7 256 73.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160z" />
</svg>
</div>
</a>
</div>
</div>
</section>

File diff suppressed because one or more lines are too long

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

Binary file not shown.

@ -112,6 +112,11 @@
text-transform: none;
}
.md-typeset a:hover {
color: var(--md-typeset-a-color);
text-decoration: underline;
}
.md-typeset code {
border-radius: 0.2rem;
}
@ -150,34 +155,6 @@ body {
width: 100%; /* Default to full width */
}
/* rounded button */
.rounded-button {
display: inline-flex; /* Use flexbox for alignment */
align-items: center; /* Align items vertically */
justify-content: center; /* Center items horizontally */
border-radius: 100px; /* Circular corners */
padding: 9px 18px; /* Padding around the text */
margin: 0.15em 0;
border: none; /* Removes default border */
background-color: var(--md-typeset-btn-color); /* Background color */
color: var(--md-primary-fg-color) !important; /* Text color */
font-size: 0.85em; /* Font size */
text-align: center; /* Center the text */
text-decoration: none; /* Remove underline from anchor text */
cursor: pointer; /* Pointer cursor on hover */
}
.rounded-button:hover {
background-color: var(--md-typeset-btn-hover-color);
}
.rounded-button svg {
fill: var(--md-primary-fg-color); /* Fill SVG icon with text color */
width: 1.2em;
height: auto;
margin-right: 0.5em; /* Add some space between the SVG icon and the text */
}
/* Admonition for python tutor */
.md-typeset .admonition.pythontutor,
.md-typeset details.pythontutor {
@ -237,10 +214,69 @@ body {
max-width: 70vw;
}
.hero-btn {
/* rounded button */
.rounded-button {
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 10em;
margin: 0 0.1em;
padding: 0.5em 1.3em;
font-size: 0.85em;
border: none;
background-color: var(--md-typeset-btn-color);
color: var(--md-primary-fg-color) !important;
text-align: center;
text-decoration: none;
cursor: pointer;
}
.rounded-button:hover {
background-color: var(--md-typeset-btn-hover-color);
}
.rounded-button p {
margin: 0;
margin-bottom: 0.1em;
}
.rounded-button svg {
fill: var(--md-primary-fg-color);
width: auto;
height: 1.2em;
margin-right: 0.5em;
}
/* text button */
.text-button-container {
width: 100%;
display: flex;
flex-direction: row;
justify-content: center;
height: auto;
margin: 0 auto;
}
.text-button {
display: flex;
flex-direction: row;
align-items: center;
color: var(--md-typeset-btn-color);
text-decoration: none;
margin: 0 1em;
}
.text-button:hover {
text-decoration: underline;
}
.text-button svg {
display: inline-block;
fill: var(--md-typeset-btn-color);
width: auto;
height: 0.9em;
background-size: cover;
padding-top: 0.17em;
margin-left: 0.4em;
}
/* hero image */
@ -284,8 +320,8 @@ a:hover .hero-on-hover {
}
a:hover .hero-caption {
text-decoration: underline;
color: var(--md-typeset-btn-color);
font-weight: bold;
}
/* code badge */

Loading…
Cancel
Save