This commit is contained in:
krahets
2023-02-24 11:43:41 +08:00
parent 9cdda7ae49
commit 0edd696eb7
5 changed files with 52 additions and 48 deletions

View File

@ -1720,6 +1720,10 @@
</ol>
<p>其它整数类型 byte, short, long 取值范围的计算方法与 int 类似,在此不再赘述。</p>
<h3 id="_2">浮点数表示方式 *<a class="headerlink" href="#_2" title="Permanent link">&para;</a></h3>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>在本书中,标题后的 <code>*</code> 符号代表选读章节,如果你觉得理解困难,建议先跳过,等学完必读章节后续再单独攻克。 </p>
</div>
<p>细心的你可能会疑惑: int 和 float 长度相同,都是 4 bytes <strong>但为什么 float 的取值范围远大于 int</strong> ?按说 float 需要表示小数,取值范围应该变小才对。</p>
<p>其实,这是因为浮点数 float 采用了不同的表示方式。IEEE 754 标准规定32-bit 长度的 float 由以下部分构成:</p>
<ul>

View File

@ -1820,7 +1820,7 @@
</div>
<div class="admonition question">
<p class="admonition-title">广度优先遍历的序列是否唯一?</p>
<p>不唯一。广度优先遍历只要求“由近及远”,相同距离的多个顶点的遍历顺序允许任意打乱。以上图为例,顶点 <span class="arithmatex">\(1\)</span> , <span class="arithmatex">\(3\)</span> 的访问顺序可以交换、顶点 <span class="arithmatex">\(2\)</span> , <span class="arithmatex">\(4\)</span> , <span class="arithmatex">\(6\)</span> 的访问顺序也可以任意交换、以此类推……</p>
<p>不唯一。广度优先遍历只要求“由近及远”,<strong>而多个相同距离的顶点的遍历顺序允许任意打乱</strong>。以上图为例,顶点 <span class="arithmatex">\(1\)</span> , <span class="arithmatex">\(3\)</span> 的访问顺序可以交换、顶点 <span class="arithmatex">\(2\)</span> , <span class="arithmatex">\(4\)</span> , <span class="arithmatex">\(6\)</span> 的访问顺序也可以任意交换、以此类推……</p>
</div>
<h3 id="_2">复杂度分析<a class="headerlink" href="#_2" title="Permanent link">&para;</a></h3>
<p><strong>时间复杂度:</strong> 所有顶点都会入队、出队一次,使用 <span class="arithmatex">\(O(|V|)\)</span> 时间;在遍历邻接顶点的过程中,由于是无向图,因此所有边都会被访问 <span class="arithmatex">\(2\)</span> 次,使用 <span class="arithmatex">\(O(2|E|)\)</span> 时间;总体使用 <span class="arithmatex">\(O(|V| + |E|)\)</span> 时间。</p>

File diff suppressed because one or more lines are too long

View File

@ -2,232 +2,232 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.hello-algo.com/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_array_and_linkedlist/array/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_array_and_linkedlist/linked_list/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_array_and_linkedlist/list/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_array_and_linkedlist/summary/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_computational_complexity/performance_evaluation/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_computational_complexity/space_complexity/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_computational_complexity/space_time_tradeoff/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_computational_complexity/summary/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_computational_complexity/time_complexity/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_data_structure/classification_of_data_structure/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_data_structure/data_and_memory/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_data_structure/summary/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_graph/graph/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_graph/graph_operations/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_graph/graph_traversal/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_hashing/hash_collision/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_hashing/hash_map/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_hashing/summary/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_heap/heap/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_introduction/algorithms_are_everywhere/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_introduction/what_is_dsa/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_preface/about_the_book/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_preface/contribution/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_preface/installation/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_preface/suggestions/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_reference/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_searching/binary_search/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_searching/hashing_search/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_searching/linear_search/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_searching/summary/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/bubble_sort/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/insertion_sort/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/intro_to_sort/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/merge_sort/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/quick_sort/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_sorting/summary/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_stack_and_queue/deque/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_stack_and_queue/queue/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_stack_and_queue/stack/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_stack_and_queue/summary/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_tree/avl_tree/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_tree/binary_search_tree/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_tree/binary_tree/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_tree/binary_tree_traversal/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.hello-algo.com/chapter_tree/summary/</loc>
<lastmod>2023-02-23</lastmod>
<lastmod>2023-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>

Binary file not shown.