This commit is contained in:
krahets
2023-12-27 00:48:07 +08:00
parent e5eb0ab492
commit 5e0d7327db
51 changed files with 27097 additions and 284 deletions
+531 -11
View File
@@ -15,6 +15,10 @@
<link rel="canonical" href="https://www.hello-algo.com/en/chapter_data_structure/">
<link rel="prev" href="../chapter_computational_complexity/summary/">
<link rel="next" href="classification_of_data_structure/">
<link rel="icon" href="../assets/images/favicon.png">
@@ -22,7 +26,7 @@
<title>Data Structure - Hello Algo</title>
<title>Chapter 3.   Data Structures - Hello Algo</title>
@@ -87,7 +91,7 @@
<div data-md-component="skip">
<a href="#data-structure" class="md-skip">
<a href="#chapter-3-data-structures" class="md-skip">
Skip to content
</a>
@@ -122,7 +126,7 @@
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
Data Structure
Chapter 3. &nbsp; Data Structures
</span>
</div>
@@ -362,7 +366,7 @@
<span class="md-ellipsis">
0.1 The Book
0.1 About This Book
</span>
@@ -493,7 +497,7 @@
<span class="md-ellipsis">
1.1 Algorithms Are Everywhere
1.1 Algorithms are Everywhere
</span>
@@ -514,7 +518,7 @@
<span class="md-ellipsis">
1.2 What Is Algorithms
1.2 What is an Algorithm
</span>
@@ -628,7 +632,7 @@
<span class="md-ellipsis">
2.1 Evaluating Algorithm Efficiency
2.1 Algorithm Efficiency Assessment
</span>
@@ -729,6 +733,362 @@
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4" checked>
<div class="md-nav__link md-nav__container">
<a href="./" class="md-nav__link md-nav__link--active">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11 13.5v8H3v-8h8m-2 2H5v4h4v-4M12 2l5.5 9h-11L12 2m0 3.86L10.08 9h3.84L12 5.86M17.5 13c2.5 0 4.5 2 4.5 4.5S20 22 17.5 22 13 20 13 17.5s2-4.5 4.5-4.5m0 2a2.5 2.5 0 0 0-2.5 2.5 2.5 2.5 0 0 0 2.5 2.5 2.5 2.5 0 0 0 2.5-2.5 2.5 2.5 0 0 0-2.5-2.5Z"/></svg>
<span class="md-ellipsis">
Chapter 3. Data Structures
</span>
</a>
<label class="md-nav__link md-nav__link--active" for="__nav_4" id="__nav_4_label" tabindex="0">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="true">
<label class="md-nav__title" for="__nav_4">
<span class="md-nav__icon md-icon"></span>
Chapter 3. Data Structures
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="classification_of_data_structure/" class="md-nav__link">
<span class="md-ellipsis">
3.1 Classification of Data Structures
</span>
</a>
</li>
<li class="md-nav__item">
<a href="basic_data_types/" class="md-nav__link">
<span class="md-ellipsis">
3.2 Fundamental Data Types
</span>
</a>
</li>
<li class="md-nav__item">
<a href="number_encoding/" class="md-nav__link">
<span class="md-ellipsis">
3.3 Number Encoding *
</span>
</a>
</li>
<li class="md-nav__item">
<a href="character_encoding/" class="md-nav__link">
<span class="md-ellipsis">
3.4 Character Encoding *
</span>
</a>
</li>
<li class="md-nav__item">
<a href="summary/" class="md-nav__link">
<span class="md-ellipsis">
3.5 Summary
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5" >
<div class="md-nav__link md-nav__container">
<a href="../chapter_array_and_linkedlist/" class="md-nav__link ">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 5v14h17V5H3m4 2v2H5V7h2m-2 6v-2h2v2H5m0 2h2v2H5v-2m13 2H9v-2h9v2m0-4H9v-2h9v2m0-4H9V7h9v2Z"/></svg>
<span class="md-ellipsis">
Chapter 4. Array and Linked List
</span>
</a>
<label class="md-nav__link " for="__nav_5" id="__nav_5_label" tabindex="0">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_5_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_5">
<span class="md-nav__icon md-icon"></span>
Chapter 4. Array and Linked List
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../chapter_array_and_linkedlist/array/" class="md-nav__link">
<span class="md-ellipsis">
4.1 Array
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../chapter_array_and_linkedlist/linked_list/" class="md-nav__link">
<span class="md-ellipsis">
4.2 Linked List
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../chapter_array_and_linkedlist/list/" class="md-nav__link">
<span class="md-ellipsis">
4.3 List
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../chapter_array_and_linkedlist/ram_and_cache/" class="md-nav__link">
<span class="md-ellipsis">
4.4 Memory and Cache
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../chapter_array_and_linkedlist/summary/" class="md-nav__link">
<span class="md-ellipsis">
4.5 Summary
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
@@ -749,6 +1109,23 @@
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#_1" class="md-nav__link">
<span class="md-ellipsis">
本章内容
</span>
</a>
</li>
</ul>
</nav>
</div>
</div>
@@ -783,15 +1160,23 @@
<!-- Page content -->
<h1 id="data-structure">Data Structure<a class="headerlink" href="#data-structure" title="Permanent link">&para;</a></h1>
<h1 id="chapter-3-data-structures">Chapter 3. &nbsp; Data Structures<a class="headerlink" href="#chapter-3-data-structures" title="Permanent link">&para;</a></h1>
<div class="center-table">
<p><a class="glightbox" href="../assets/covers/chapter_data_structure.jpg" data-type="image" data-width="100%" data-height="auto" data-desc-position="bottom"><img alt="data structure" src="../assets/covers/chapter_data_structure.jpg" /></a></p>
<p><a class="glightbox" href="../assets/covers/chapter_data_structure.jpg" data-type="image" data-width="100%" data-height="auto" data-desc-position="bottom"><img alt="Data Structures" class="cover-image" src="../assets/covers/chapter_data_structure.jpg" /></a></p>
</div>
<div class="admonition abstract">
<p class="admonition-title">Abstract</p>
<p>Data structures resemble a stable and diverse framework.</p>
<p>They serve as a blueprint for organizing data orderly, enabling algorithms to come to life upon this foundation.</p>
<p>Data structures serve as a robust and diverse framework.</p>
<p>They offer a blueprint for the orderly organization of data, upon which algorithms come to life.</p>
</div>
<h2 id="_1">本章内容<a class="headerlink" href="#_1" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="https://www.hello-algo.com/chapter_data_structure/classification_of_data_structure/">3.1 &nbsp; Classification of Data Structures</a></li>
<li><a href="https://www.hello-algo.com/chapter_data_structure/basic_data_types/">3.2 &nbsp; Fundamental Data Types</a></li>
<li><a href="https://www.hello-algo.com/chapter_data_structure/number_encoding/">3.3 &nbsp; Number Encoding *</a></li>
<li><a href="https://www.hello-algo.com/chapter_data_structure/character_encoding/">3.4 &nbsp; Character Encoding *</a></li>
<li><a href="https://www.hello-algo.com/chapter_data_structure/summary/">3.5 &nbsp; Summary</a></li>
</ul>
<!-- Source file information -->
@@ -810,13 +1195,110 @@ aria-label="Footer"
<!-- Link to previous page -->
<a
href="../chapter_computational_complexity/summary/"
class="md-footer__link md-footer__link--prev"
aria-label="Previous: 2.5 Summary"
rel="prev"
>
<div class="md-footer__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12Z"/></svg>
</div>
<div class="md-footer__title">
<span class="md-footer__direction">
Previous
</span>
<div class="md-ellipsis">
2.5 Summary
</div>
</div>
</a>
<!-- Link to next page -->
<a
href="classification_of_data_structure/"
class="md-footer__link md-footer__link--next"
aria-label="Next: 3.1 Classification of Data Structures"
rel="next"
>
<div class="md-footer__title">
<span class="md-footer__direction">
Next
</span>
<div class="md-ellipsis">
3.1 Classification of Data Structures
</div>
</div>
<div class="md-footer__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4Z"/></svg>
</div>
</a>
</nav>
<!-- Comment system -->
<h5 align="center" id="__comments">Feel free to drop your insights, questions or suggestions</h5>
<!-- Insert generated snippet here -->
<script
src="https://giscus.app/client.js"
data-repo="krahets/hello-algo"
data-repo-id="R_kgDOIXtSqw"
data-category="Announcements"
data-category-id="DIC_kwDOIXtSq84CSZk_"
data-mapping="pathname"
data-strict="1"
data-reactions-enabled="1"
data-emit-metadata="0"
data-input-position="top"
data-theme="preferred_color_scheme"
data-lang="en"
crossorigin="anonymous"
async
>
</script>
<!-- Synchronize Giscus theme with palette -->
<script>
var giscus = document.querySelector("script[src*=giscus]")
/* Set palette on initial load */
var palette = __md_get("__palette")
if (palette && typeof palette.color === "object") {
var theme = palette.color.scheme === "slate" ? "dark_dimmed" : "light"
giscus.setAttribute("data-theme", theme)
}
/* Register event handlers after documented loaded */
document.addEventListener("DOMContentLoaded", function() {
var ref = document.querySelector("[data-md-component=palette]")
ref.addEventListener("change", function() {
var palette = __md_get("__palette")
if (palette && typeof palette.color === "object") {
var theme = palette.color.scheme === "slate" ? "dark_dimmed" : "light"
/* Instruct Giscus to change theme */
var frame = document.querySelector(".giscus-frame")
frame.contentWindow.postMessage(
{ giscus: { setConfig: { theme } } },
"https://giscus.app"
)
}
})
})
</script>
</article>
</div>
@@ -838,6 +1320,44 @@ aria-label="Footer"
<footer class="md-footer">
<nav class="md-footer__inner md-grid" aria-label="Footer" >
<a href="../chapter_computational_complexity/summary/" class="md-footer__link md-footer__link--prev" aria-label="Previous: 2.5 Summary">
<div class="md-footer__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12Z"/></svg>
</div>
<div class="md-footer__title">
<span class="md-footer__direction">
Previous
</span>
<div class="md-ellipsis">
2.5 Summary
</div>
</div>
</a>
<a href="classification_of_data_structure/" class="md-footer__link md-footer__link--next" aria-label="Next: 3.1 Classification of Data Structures">
<div class="md-footer__title">
<span class="md-footer__direction">
Next
</span>
<div class="md-ellipsis">
3.1 Classification of Data Structures
</div>
</div>
<div class="md-footer__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4Z"/></svg>
</div>
</a>
</nav>
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">