This commit is contained in:
krahets
2023-11-26 02:06:45 +08:00
parent 8b60940d5a
commit baa76db4e1
110 changed files with 7129 additions and 254 deletions

View File

@@ -15,7 +15,7 @@
<link rel="canonical" href="https://www.hello-algo.com/chapter_array_and_linkedlist/summary/">
<link rel="prev" href="../list/">
<link rel="prev" href="../ram_and_cache/">
<link rel="next" href="../../chapter_stack_and_queue/">
@@ -26,7 +26,7 @@
<title>4.4   小结 - Hello 算法</title>
<title>4.5   小结 - Hello 算法</title>
@@ -94,7 +94,7 @@
<div data-md-component="skip">
<a href="#44" class="md-skip">
<a href="#45" class="md-skip">
跳转至
</a>
@@ -129,7 +129,7 @@
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
4.4 &nbsp; 小结
4.5 &nbsp; 小结
</span>
</div>
@@ -895,6 +895,8 @@
@@ -1002,6 +1004,34 @@
<li class="md-nav__item">
<a href="../ram_and_cache/" class="md-nav__link">
<span class="md-ellipsis">
4.4 &nbsp; 内存与缓存 *
</span>
<span class="md-status md-status--new" title="最近添加">
</span>
</a>
</li>
@@ -1017,7 +1047,7 @@
<span class="md-ellipsis">
4.4 &nbsp; 小结
4.5 &nbsp; 小结
</span>
@@ -1028,7 +1058,7 @@
<span class="md-ellipsis">
4.4 &nbsp; 小结
4.5 &nbsp; 小结
</span>
@@ -3351,7 +3381,7 @@
<!-- Page content -->
<h1 id="44">4.4 &nbsp; 小结<a class="headerlink" href="#44" title="Permanent link">&para;</a></h1>
<h1 id="45">4.5 &nbsp; 小结<a class="headerlink" href="#45" title="Permanent link">&para;</a></h1>
<h3 id="1">1. &nbsp; 重点回顾<a class="headerlink" href="#1" title="Permanent link">&para;</a></h3>
<ul>
<li>数组和链表是两种基本的数据结构,分别代表数据在计算机内存中的两种存储方式:连续空间存储和分散空间存储。两者的特点呈现出互补的特性。</li>
@@ -3360,6 +3390,9 @@
<li>常见的链表类型包括单向链表、循环链表、双向链表,它们分别具有各自的应用场景。</li>
<li>列表是一种支持增删查改的元素有序集合,通常基于动态数组实现,其保留了数组的优势,同时可以灵活调整长度。</li>
<li>列表的出现大幅地提高了数组的实用性,但可能导致部分内存空间浪费。</li>
<li>程序运行时,数据主要存储在内存中。数组提供更高的内存空间效率,而链表则在内存使用上更加灵活。</li>
<li>缓存通过缓存行、预取机制以及空间和时间局部性等数据加载机制,为 CPU 提供快速数据访问,显著提升程序的执行效率。</li>
<li>由于数组具有更高的缓存命中率,因此它通常比链表更高效。在选择数据结构时,应根据具体需求和场景做出恰当选择。</li>
</ul>
<h3 id="2-q-a">2. &nbsp; Q &amp; A<a class="headerlink" href="#2-q-a" title="Permanent link">&para;</a></h3>
<div class="admonition question">
@@ -3445,9 +3478,9 @@ aria-label="页脚"
<a
href="../list/"
href="../ram_and_cache/"
class="md-footer__link md-footer__link--prev"
aria-label="上一页: 4.3 &amp;nbsp; 列表"
aria-label="上一页: 4.4 &amp;nbsp; 内存与缓存 *"
rel="prev"
>
<div class="md-footer__button md-icon">
@@ -3459,7 +3492,7 @@ aria-label="页脚"
上一页
</span>
<div class="md-ellipsis">
4.3 &nbsp; 列表
4.4 &nbsp; 内存与缓存 *
</div>
</div>
</a>
@@ -3571,7 +3604,7 @@ aria-label="页脚"
<nav class="md-footer__inner md-grid" aria-label="页脚" >
<a href="../list/" class="md-footer__link md-footer__link--prev" aria-label="上一页: 4.3 &amp;nbsp; 列表" rel="prev">
<a href="../ram_and_cache/" class="md-footer__link md-footer__link--prev" aria-label="上一页: 4.4 &amp;nbsp; 内存与缓存 *" 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>
@@ -3581,7 +3614,7 @@ aria-label="页脚"
上一页
</span>
<div class="md-ellipsis">
4.3 &nbsp; 列表
4.4 &nbsp; 内存与缓存 *
</div>
</div>
</a>