Release reviewed gh-pages candidate

This commit is contained in:
krahets
2026-11-18 16:34:49 +08:00
parent 8966617032
commit 451a6b692c
822 changed files with 3585 additions and 3541 deletions

View File

@@ -2065,8 +2065,8 @@
<!-- Page content -->
<h1 id="41-arrays">4.1   Arrays<a class="headerlink" href="#41-arrays" title="Permanent link"></a></h1>
<p>An <u>array</u> is a linear data structure that stores elements of the same type in contiguous memory. An element's position in the array is its <u>index</u>. Figure 4-1 shows the main concepts and storage layout.</p>
<p><ha-svg-figure class="animation-figure" data-book-key="en/chapter_array_and_linkedlist/array.assets/array_definition.png" data-dark-src="/assets/figure-svg/figures/91f177614dfd226cebfa4cb8.json" data-src="/assets/figure-svg/figures/11f0cd181745d783cdba45cf.json" style=";--figure-ratio:960.0/540.0"><object data="/en/chapter_array_and_linkedlist/array.assets/array_definition.svg" data-theme="light" tabindex="-1" type="image/svg+xml">Array definition and storage layout</object><object data="/en/chapter_array_and_linkedlist/array.assets/array_definition.dark.svg" data-theme="dark" tabindex="-1" type="image/svg+xml">Array definition and storage layout</object></ha-svg-figure></p>
<p align="center"> Figure 4-1   Array definition and storage layout </p>
<p><ha-svg-figure aria-label="Array elements, indices, and memory addresses" class="animation-figure" data-book-key="en/chapter_array_and_linkedlist/array.assets/array_definition.png" data-dark-src="/assets/figure-svg/figures/91f177614dfd226cebfa4cb8.json" data-figure-accessible="" data-src="/assets/figure-svg/figures/11f0cd181745d783cdba45cf.json" role="img" style=";--figure-ratio:960.0/540.0"><object aria-hidden="true" data="/en/chapter_array_and_linkedlist/array.assets/array_definition.svg" data-theme="light" inert="" tabindex="-1" type="image/svg+xml">Array definition and storage layout</object><object aria-hidden="true" data="/en/chapter_array_and_linkedlist/array.assets/array_definition.dark.svg" data-theme="dark" inert="" tabindex="-1" type="image/svg+xml">Array definition and storage layout</object></ha-svg-figure></p>
<p align="center"> Figure 4-1   Array definition and storage layout </p><div class="ha-sr-only figure-description"><h2>Description of Figure 4-1: Array elements, indices, and memory addresses</h2><p>An array locates elements using 0-based indices, storing all elements contiguously in memory in equal-sized slots.</p><p>The left side lists the array, indices, and memory addresses; in the second row of the grid on the right, 5 contiguous green cells represent the memory allocated to the array, while the remaining light gray cells represent free memory.</p><table><caption>Positions and memory addresses of the five elements</caption><thead><tr><th scope="col">Index</th><th scope="col">Element value</th><th scope="col">Starting memory address</th></tr></thead><tbody><tr><th scope="row">0</th><td>1</td><td>00</td></tr><tr><th scope="row">1</th><td>3</td><td>04</td></tr><tr><th scope="row">2</th><td>2</td><td>08</td></tr><tr><th scope="row">3</th><td>5</td><td>12</td></tr><tr><th scope="row">4</th><td>4</td><td>16</td></tr></tbody></table><p>In this example, each element occupies 4 bytes, so the starting addresses of adjacent elements always differ by 4. The leading 0 in an address only pads the width and does not indicate octal notation.</p><p>An index is an element's ordinal position in the array, the element value is the data stored at that position, and the memory address is the starting number of its storage unit; the three are distinct concepts.</p></div>
<h2 id="411-common-array-operations">4.1.1   Common array operations<a class="headerlink" href="#411-common-array-operations" title="Permanent link"></a></h2>
<h3 id="1-initializing-an-array">1.   Initializing an array<a class="headerlink" href="#1-initializing-an-array" title="Permanent link"></a></h3>
<p>We can initialize an array with or without explicit values. When values are not specified, most programming languages initialize the elements to <span class="arithmatex">\(0\)</span>:</p>
@@ -2171,8 +2171,8 @@
</details>
<h3 id="2-accessing-an-element">2.   Accessing an element<a class="headerlink" href="#2-accessing-an-element" title="Permanent link"></a></h3>
<p>Because array elements occupy contiguous memory, their addresses are easy to calculate. Given the array's address (the address of its first element) and an index, the formula in Figure 4-2 gives the element's address, allowing direct access.</p>
<p><ha-svg-figure class="animation-figure" data-book-key="en/chapter_array_and_linkedlist/array.assets/array_memory_location_calculation.png" data-dark-src="/assets/figure-svg/figures/3f3ad9fc8fd1d0ec4a9edcbc.json" data-src="/assets/figure-svg/figures/c859ba77be30b329c85a6367.json" style=";--figure-ratio:960.0/540.0"><object data="/en/chapter_array_and_linkedlist/array.assets/array_memory_location_calculation.svg" data-theme="light" tabindex="-1" type="image/svg+xml">Calculating an array element's memory address</object><object data="/en/chapter_array_and_linkedlist/array.assets/array_memory_location_calculation.dark.svg" data-theme="dark" tabindex="-1" type="image/svg+xml">Calculating an array element's memory address</object></ha-svg-figure></p>
<p align="center"> Figure 4-2   Calculating an array element's memory address </p>
<p><ha-svg-figure aria-label="Calculating an array element's memory address" class="animation-figure" data-book-key="en/chapter_array_and_linkedlist/array.assets/array_memory_location_calculation.png" data-dark-src="/assets/figure-svg/figures/3f3ad9fc8fd1d0ec4a9edcbc.json" data-figure-accessible="" data-src="/assets/figure-svg/figures/c859ba77be30b329c85a6367.json" role="img" style=";--figure-ratio:960.0/540.0"><object aria-hidden="true" data="/en/chapter_array_and_linkedlist/array.assets/array_memory_location_calculation.svg" data-theme="light" inert="" tabindex="-1" type="image/svg+xml">Calculating an array element's memory address</object><object aria-hidden="true" data="/en/chapter_array_and_linkedlist/array.assets/array_memory_location_calculation.dark.svg" data-theme="dark" inert="" tabindex="-1" type="image/svg+xml">Calculating an array element's memory address</object></ha-svg-figure></p>
<p align="center"> Figure 4-2   Calculating an array element's memory address </p><div class="ha-sr-only figure-description"><h4>Description of Figure 4-2: Calculating an array element's memory address</h4><p>Compute an element's location directly from the starting address, fixed element size, and index.</p><p>The upper part arranges the array, indices, and memory addresses with the column at index 3 highlighted; the lower part gives the address formula and a worked substitution. Each element occupies 4 bytes; the upper address row uses two-digit notation (such as 00 and 12), while the formula below uses three-digit notation (000 and 012). Leading zeros are purely for alignment, and all numbers are decimal.</p><table><caption>Indices, values, and addresses shown in the figure</caption><thead><tr><th scope="col">Index</th><th scope="col">Element value</th><th scope="col">Memory address</th></tr></thead><tbody><tr><th scope="row">0</th><td>1</td><td>00</td></tr><tr><th scope="row">1</th><td>3</td><td>04</td></tr><tr><th scope="row">2</th><td>2</td><td>08</td></tr><tr><th scope="row">3</th><td>5</td><td>12</td></tr><tr><th scope="row">4</th><td>4</td><td>16</td></tr></tbody></table><p>Element address = address of the first element + element size × index. Indexing starts at 0, so index 3 is the 4th element, with value 5; it is 3 elements past the first element, giving a byte offset of 4 × 3 = 12 and an address of 000 + 4 × 3 = 012. This locates the element by index rather than searching for an element whose value is 3.</p><p>With contiguous storage and equal-sized elements, a single multiplication and addition gives the address, supporting O(1) random access.</p></div>
<p>The first element has index <span class="arithmatex">\(0\)</span>, which may seem unintuitive because counting from <span class="arithmatex">\(1\)</span> feels more natural. However, <strong>an index essentially describes an offset from the starting memory address</strong>. The first element's offset is <span class="arithmatex">\(0\)</span>, so index <span class="arithmatex">\(0\)</span> makes sense.</p>
<p>Array access is very efficient: any element can be accessed directly in <span class="arithmatex">\(O(1)\)</span> time.</p>
<div class="tabbed-set tabbed-alternate" data-tabs="2:13"><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"/><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></div>
@@ -2329,8 +2329,8 @@
</details>
<h3 id="3-inserting-an-element">3.   Inserting an element<a class="headerlink" href="#3-inserting-an-element" title="Permanent link"></a></h3>
<p>Array elements sit next to one another, with no room between them for more data. As shown in Figure 4-3, inserting into the middle requires shifting every element at or after the insertion point one position toward the end, then assigning the new element at the desired index.</p>
<p><ha-svg-figure class="animation-figure" data-book-key="en/chapter_array_and_linkedlist/array.assets/array_insert_element.png" data-dark-src="/assets/figure-svg/figures/d3d430ae5f5290ccb78a64e8.json" data-src="/assets/figure-svg/figures/c95261c7660a33d232c2c75c.json" style=";--figure-ratio:960.0/540.0"><object data="/en/chapter_array_and_linkedlist/array.assets/array_insert_element.svg" data-theme="light" tabindex="-1" type="image/svg+xml">Inserting an element into an array</object><object data="/en/chapter_array_and_linkedlist/array.assets/array_insert_element.dark.svg" data-theme="dark" tabindex="-1" type="image/svg+xml">Inserting an element into an array</object></ha-svg-figure></p>
<p align="center"> Figure 4-3   Inserting an element into an array </p>
<p><ha-svg-figure aria-label="Inserting an element into an array" class="animation-figure" data-book-key="en/chapter_array_and_linkedlist/array.assets/array_insert_element.png" data-dark-src="/assets/figure-svg/figures/d3d430ae5f5290ccb78a64e8.json" data-figure-accessible="" data-src="/assets/figure-svg/figures/c95261c7660a33d232c2c75c.json" role="img" style=";--figure-ratio:960.0/540.0"><object aria-hidden="true" data="/en/chapter_array_and_linkedlist/array.assets/array_insert_element.svg" data-theme="light" inert="" tabindex="-1" type="image/svg+xml">Inserting an element into an array</object><object aria-hidden="true" data="/en/chapter_array_and_linkedlist/array.assets/array_insert_element.dark.svg" data-theme="dark" inert="" tabindex="-1" type="image/svg+xml">Inserting an element into an array</object></ha-svg-figure></p>
<p align="center"> Figure 4-3   Inserting an element into an array </p><div class="ha-sr-only figure-description"><h4>Description of Figure 4-3: Inserting an element into an array</h4><p>Insert element 3 at index 1: first copy existing elements one position to the right starting from the end, then write the new element.</p><p>Array nums has 5 slots at indices 0 through 4. Its initial storage is [1, 2, 5, 4, 0], where only the first 4 elements [1, 2, 5, 4] are valid and the trailing 0 at index 4 is an unused placeholder. The goal is to insert 3 at index 1 while preserving the relative order of the existing valid elements.</p><table><caption>Five slots after each assignment</caption><thead><tr><th scope="col">Operation</th><th scope="col">Index 0</th><th scope="col">Index 1</th><th scope="col">Index 2</th><th scope="col">Index 3</th><th scope="col">Index 4</th></tr></thead><tbody><tr><th scope="row">Initial state</th><td>1</td><td>2</td><td>5</td><td>4</td><td>0</td></tr><tr><th scope="row">nums[4] = nums[3]</th><td>1</td><td>2</td><td>5</td><td>4</td><td>4</td></tr><tr><th scope="row">nums[3] = nums[2]</th><td>1</td><td>2</td><td>5</td><td>5</td><td>4</td></tr><tr><th scope="row">nums[2] = nums[1]</th><td>1</td><td>2</td><td>2</td><td>5</td><td>4</td></tr><tr><th scope="row">nums[1] = 3</th><td>1</td><td>3</td><td>2</td><td>5</td><td>4</td></tr></tbody></table><p>Copying backward from the end toward the insertion point ensures that every element about to be overwritten and still needed has already been copied to the adjacent slot on its right. Copying does not clear the source slot, so duplicate values appear in intermediate states. Inserting into the middle of an array shifts O(n) elements on average.</p><p>After insertion, all 5 slots hold valid elements; the caller updates the valid length to 5 accordingly, whereas the sample insert function itself only assigns slot values. When the text later notes that the last element of a fixed-length array is "lost", in this example only the placeholder 0 in the last slot is overwritten, so none of the four original valid elements are lost. Had all 5 slots originally held valid elements, overwriting would lose the final valid element, requiring array expansion beforehand or rejecting the insertion.</p></div>
<p>Because an array's length is fixed, inserting an element causes the last element to be lost. We will discuss the solution in the section on lists.</p>
<div class="tabbed-set tabbed-alternate" data-tabs="3:13"><input checked="checked" id="__tabbed_3_1" name="__tabbed_3" type="radio"/><input id="__tabbed_3_2" name="__tabbed_3" type="radio"/><input id="__tabbed_3_3" name="__tabbed_3" type="radio"/><input id="__tabbed_3_4" name="__tabbed_3" type="radio"/><input id="__tabbed_3_5" name="__tabbed_3" type="radio"/><input id="__tabbed_3_6" name="__tabbed_3" type="radio"/><input id="__tabbed_3_7" name="__tabbed_3" type="radio"/><input id="__tabbed_3_8" name="__tabbed_3" type="radio"/><input id="__tabbed_3_9" name="__tabbed_3" type="radio"/><input id="__tabbed_3_10" name="__tabbed_3" type="radio"/><input id="__tabbed_3_11" name="__tabbed_3" type="radio"/><input id="__tabbed_3_12" name="__tabbed_3" type="radio"/><input id="__tabbed_3_13" name="__tabbed_3" type="radio"/><div class="tabbed-labels"><label for="__tabbed_3_1">Python</label><label for="__tabbed_3_2">C++</label><label for="__tabbed_3_3">Java</label><label for="__tabbed_3_4">C#</label><label for="__tabbed_3_5">Go</label><label for="__tabbed_3_6">Swift</label><label for="__tabbed_3_7">JS</label><label for="__tabbed_3_8">TS</label><label for="__tabbed_3_9">Dart</label><label for="__tabbed_3_10">Rust</label><label for="__tabbed_3_11">C</label><label for="__tabbed_3_12">Kotlin</label><label for="__tabbed_3_13">Ruby</label></div>
<div class="tabbed-content">
@@ -2498,8 +2498,8 @@
</details>
<h3 id="4-removing-an-element">4.   Removing an element<a class="headerlink" href="#4-removing-an-element" title="Permanent link"></a></h3>
<p>Similarly, as shown in Figure 4-4, removing the element at index <span class="arithmatex">\(i\)</span> requires shifting every element after <span class="arithmatex">\(i\)</span> one position toward the beginning.</p>
<p><ha-svg-figure class="animation-figure" data-book-key="en/chapter_array_and_linkedlist/array.assets/array_remove_element.png" data-dark-src="/assets/figure-svg/figures/549802dcc1ab99dab22b9853.json" data-src="/assets/figure-svg/figures/dfe5e725d0a09a6e77b6fd0a.json" style=";--figure-ratio:960.0/540.0"><object data="/en/chapter_array_and_linkedlist/array.assets/array_remove_element.svg" data-theme="light" tabindex="-1" type="image/svg+xml">Removing an element from an array</object><object data="/en/chapter_array_and_linkedlist/array.assets/array_remove_element.dark.svg" data-theme="dark" tabindex="-1" type="image/svg+xml">Removing an element from an array</object></ha-svg-figure></p>
<p align="center"> Figure 4-4   Removing an element from an array </p>
<p><ha-svg-figure aria-label="Removing an array element by shifting left" class="animation-figure" data-book-key="en/chapter_array_and_linkedlist/array.assets/array_remove_element.png" data-dark-src="/assets/figure-svg/figures/549802dcc1ab99dab22b9853.json" data-figure-accessible="" data-src="/assets/figure-svg/figures/dfe5e725d0a09a6e77b6fd0a.json" role="img" style=";--figure-ratio:960.0/540.0"><object aria-hidden="true" data="/en/chapter_array_and_linkedlist/array.assets/array_remove_element.svg" data-theme="light" inert="" tabindex="-1" type="image/svg+xml">Removing an element from an array</object><object aria-hidden="true" data="/en/chapter_array_and_linkedlist/array.assets/array_remove_element.dark.svg" data-theme="dark" inert="" tabindex="-1" type="image/svg+xml">Removing an element from an array</object></ha-svg-figure></p>
<p align="center"> Figure 4-4   Removing an element from an array </p><div class="ha-sr-only figure-description"><h4>Description of Figure 4-4: Removing an array element by shifting left</h4><p>Overwrite the removed position to preserve the order of the remaining elements while distinguishing valid length from total slot count.</p><p>Array nums has 5 slots, initialized to [1, 3, 2, 5, 4] with valid length 5 and 0-based indices. The goal is to remove 3 at index 1 while preserving the order of the remaining elements.</p><table><caption>Complete slot storage during leftward shifting</caption><thead><tr><th scope="col">State or assignment</th><th scope="col">Stored contents</th><th scope="col">Valid length or meaning</th></tr></thead><tbody><tr><th scope="row">Initial</th><td>[1,3,2,5,4]</td><td>5; 3 at index 1 is to be deleted</td></tr><tr><th scope="row">1st copy: nums[1]=nums[2]</th><td>[1,2,2,5,4]</td><td>In progress, recorded length 5</td></tr><tr><th scope="row">2nd copy: nums[2]=nums[3]</th><td>[1,2,5,5,4]</td><td>In progress, recorded length 5</td></tr><tr><th scope="row">3rd copy: nums[3]=nums[4]; caller updates valid length to 4</th><td>[1,2,5,4,4]</td><td>4; only the first 4 entries are valid, with trailing 4 left over</td></tr></tbody></table><p>Reading adjacent elements sequentially to the right of the removed position and overwriting one slot to the left ensures that every source value is read before it is overwritten. Copying modifies only the destination slot without clearing the source slot, so adjacent duplicate values appear along the way.</p><p>After three copies, the caller updates the valid length from 5 to 4, leaving only [1, 2, 5, 4] at indices 0 through 3 valid; the 4 in the final slot is an unused leftover and need not be zeroed out. The sample remove function only overwrites slots without automatically shortening a Python list; removing an element from the middle takes O(n) time on average.</p></div>
<p>After removal, the old final entry is no longer meaningful, so we do not need to change it explicitly.</p>
<div class="tabbed-set tabbed-alternate" data-tabs="4:13"><input checked="checked" id="__tabbed_4_1" name="__tabbed_4" type="radio"/><input id="__tabbed_4_2" name="__tabbed_4" type="radio"/><input id="__tabbed_4_3" name="__tabbed_4" type="radio"/><input id="__tabbed_4_4" name="__tabbed_4" type="radio"/><input id="__tabbed_4_5" name="__tabbed_4" type="radio"/><input id="__tabbed_4_6" name="__tabbed_4" type="radio"/><input id="__tabbed_4_7" name="__tabbed_4" type="radio"/><input id="__tabbed_4_8" name="__tabbed_4" type="radio"/><input id="__tabbed_4_9" name="__tabbed_4" type="radio"/><input id="__tabbed_4_10" name="__tabbed_4" type="radio"/><input id="__tabbed_4_11" name="__tabbed_4" type="radio"/><input id="__tabbed_4_12" name="__tabbed_4" type="radio"/><input id="__tabbed_4_13" name="__tabbed_4" type="radio"/><div class="tabbed-labels"><label for="__tabbed_4_1">Python</label><label for="__tabbed_4_2">C++</label><label for="__tabbed_4_3">Java</label><label for="__tabbed_4_4">C#</label><label for="__tabbed_4_5">Go</label><label for="__tabbed_4_6">Swift</label><label for="__tabbed_4_7">JS</label><label for="__tabbed_4_8">TS</label><label for="__tabbed_4_9">Dart</label><label for="__tabbed_4_10">Rust</label><label for="__tabbed_4_11">C</label><label for="__tabbed_4_12">Kotlin</label><label for="__tabbed_4_13">Ruby</label></div>
<div class="tabbed-content">
@@ -3367,5 +3367,5 @@
<script src="../../javascripts/mathjax.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.2/es5/tex-mml-chtml.min.js"></script>
<script src="../../javascripts/animation_player.js"></script>
<script defer="" src="/assets/figure-svg/js/bcdea376f01bc2bc0cac7c6c.js"></script><script defer="" src="/assets/figure-svg/js/e84f59519170c0f5ef238548.js"></script><script defer="" src="/assets/figure-svg/js/a704d8e80a80ddc71f2a03a7.js"></script><script defer="" src="/assets/figure-svg/js/bff17b8259339758cb1c4a06.js"></script></body>
<script defer="" src="/assets/figure-svg/js/00174ff861e190f5c1f09e34.js"></script><script defer="" src="/assets/figure-svg/js/e84f59519170c0f5ef238548.js"></script><script defer="" src="/assets/figure-svg/js/a704d8e80a80ddc71f2a03a7.js"></script><script defer="" src="/assets/figure-svg/js/70ae82c6406c9bdbda8e8362.js"></script></body>
</html>

View File

@@ -2049,8 +2049,8 @@
<p>Memory is a resource used by all programs, and in a complex system, free space may be scattered throughout it. An array requires contiguous storage, which may be unavailable for a very large array. This is where a linked list's flexibility helps.</p>
<p>A <u>linked list</u> is a linear data structure whose elements are node objects connected by references. Each reference stores the next node's memory address, allowing us to reach it from the current node.</p>
<p>This design lets nodes occupy scattered memory locations; their addresses need not be contiguous.</p>
<p><ha-svg-figure class="animation-figure" data-book-key="en/chapter_array_and_linkedlist/linked_list.assets/linkedlist_definition.png" data-dark-src="/assets/figure-svg/figures/4e617e07139542502ca67e80.json" data-src="/assets/figure-svg/figures/e26dd20c06648bb2b2a8e802.json" style=";--figure-ratio:960.0/540.0"><object data="/en/chapter_array_and_linkedlist/linked_list.assets/linkedlist_definition.svg" data-theme="light" tabindex="-1" type="image/svg+xml">Linked list definition and storage layout</object><object data="/en/chapter_array_and_linkedlist/linked_list.assets/linkedlist_definition.dark.svg" data-theme="dark" tabindex="-1" type="image/svg+xml">Linked list definition and storage layout</object></ha-svg-figure></p>
<p align="center"> Figure 4-5   Linked list definition and storage layout </p>
<p><ha-svg-figure aria-label="Linked list nodes and links" class="animation-figure" data-book-key="en/chapter_array_and_linkedlist/linked_list.assets/linkedlist_definition.png" data-dark-src="/assets/figure-svg/figures/4e617e07139542502ca67e80.json" data-figure-accessible="" data-src="/assets/figure-svg/figures/e26dd20c06648bb2b2a8e802.json" role="img" style=";--figure-ratio:960.0/540.0"><object aria-hidden="true" data="/en/chapter_array_and_linkedlist/linked_list.assets/linkedlist_definition.svg" data-theme="light" inert="" tabindex="-1" type="image/svg+xml">Linked list definition and storage layout</object><object aria-hidden="true" data="/en/chapter_array_and_linkedlist/linked_list.assets/linkedlist_definition.dark.svg" data-theme="dark" inert="" tabindex="-1" type="image/svg+xml">Linked list definition and storage layout</object></ha-svg-figure></p>
<p align="center"> Figure 4-5   Linked list definition and storage layout </p><div class="ha-sr-only figure-description"><h2>Description of Figure 4-5: Linked list nodes and links</h2><p>The figure consists of a logical view and a memory grid showing the same linked list. In the grid, each node occupies two adjacent cells storing its value and its successor reference next (pointer); the remaining light-colored cells represent free memory, with cell sizes shown schematically.</p><p>The linked list has 5 nodes connected along next references as 1 → 3 → 2 → 5 → 4 → None. The head node is 1, the tail node is 4, and None indicates that there is no next node. In the memory grid, nodes 2 and 5 sit lower down while the tail node 4 sits near the top: node 5's next still points to 4, showing that logical order is determined by references rather than physical location.</p></div>
<p>As shown above, the basic unit of a linked list is a <u>node</u> object. Each node holds a value and a reference to the next node.</p>
<ul>
<li>The first node is called the head, and the last is called the tail.</li>
@@ -2417,8 +2417,8 @@
<h3 id="2-inserting-a-node">2.   Inserting a node<a class="headerlink" href="#2-inserting-a-node" title="Permanent link"></a></h3>
<p>Inserting a node is straightforward. As shown in Figure 4-6, inserting a new node <code>P</code> between adjacent nodes <code>n0</code> and <code>n1</code> <strong>requires changing only two references (pointers)</strong>, taking <span class="arithmatex">\(O(1)\)</span> time.</p>
<p>In contrast, inserting an array element takes <span class="arithmatex">\(O(n)\)</span> time and is slower for large datasets.</p>
<p><ha-svg-figure class="animation-figure" data-book-key="en/chapter_array_and_linkedlist/linked_list.assets/linkedlist_insert_node.png" data-dark-src="/assets/figure-svg/figures/daaa95bcda5668b43ab0b0ae.json" data-src="/assets/figure-svg/figures/06f48e2e970a102a798f7e96.json" style=";--figure-ratio:960.0/540.0"><object data="/en/chapter_array_and_linkedlist/linked_list.assets/linkedlist_insert_node.svg" data-theme="light" tabindex="-1" type="image/svg+xml">Inserting a node into a linked list</object><object data="/en/chapter_array_and_linkedlist/linked_list.assets/linkedlist_insert_node.dark.svg" data-theme="dark" tabindex="-1" type="image/svg+xml">Inserting a node into a linked list</object></ha-svg-figure></p>
<p align="center"> Figure 4-6   Inserting a node into a linked list </p>
<p><ha-svg-figure aria-label="Inserting a node into a linked list" class="animation-figure" data-book-key="en/chapter_array_and_linkedlist/linked_list.assets/linkedlist_insert_node.png" data-dark-src="/assets/figure-svg/figures/daaa95bcda5668b43ab0b0ae.json" data-figure-accessible="" data-src="/assets/figure-svg/figures/06f48e2e970a102a798f7e96.json" role="img" style=";--figure-ratio:960.0/540.0"><object aria-hidden="true" data="/en/chapter_array_and_linkedlist/linked_list.assets/linkedlist_insert_node.svg" data-theme="light" inert="" tabindex="-1" type="image/svg+xml">Inserting a node into a linked list</object><object aria-hidden="true" data="/en/chapter_array_and_linkedlist/linked_list.assets/linkedlist_insert_node.dark.svg" data-theme="dark" inert="" tabindex="-1" type="image/svg+xml">Inserting a node into a linked list</object></ha-svg-figure></p>
<p align="center"> Figure 4-6   Inserting a node into a linked list </p><div class="ha-sr-only figure-description"><h4>Description of Figure 4-6: Inserting a node into a linked list</h4><p>To insert a new node P between adjacent nodes n0 and n1, update only two references in order: P.next and then n0.next.</p><p>Predecessor node n0 has value 1 and successor node n1 has value 3; initially n0.next points to n1, and the ellipsis to the right of n1 represents the rest of the list. Node P to be inserted has value 0 and is not yet linked into the list. Here next denotes a node's successor pointer (reference).</p><table><caption>Links during node insertion</caption><thead><tr><th scope="col">Stage</th><th scope="col">n0.next</th><th scope="col">P.next</th><th scope="col">Nodes visited starting from n0</th></tr></thead><tbody><tr><th scope="row">Initial</th><td>n1</td><td>Target not drawn</td><td>n0 → n1 → …</td></tr><tr><th scope="row">Link P to successor</th><td>n1</td><td>n1</td><td>n0 → n1 → …</td></tr><tr><th scope="row">Insertion complete</th><td>P</td><td>n1</td><td>n0 → P → n1 → …</td></tr></tbody></table><p>Linking the new node to the original successor before pointing the predecessor to the new node avoids losing the rest of the list. The code first saves n0.next in n1 and then performs the two assignments in the order shown. Traversal from n0 passes through P only after the second assignment completes.</p><p>All node values and all links after n1 remain unchanged. Given the predecessor n0, updating the two references takes O(1) time without shifting any subsequent nodes.</p></div>
<div class="tabbed-set tabbed-alternate" data-tabs="3:13"><input checked="checked" id="__tabbed_3_1" name="__tabbed_3" type="radio"/><input id="__tabbed_3_2" name="__tabbed_3" type="radio"/><input id="__tabbed_3_3" name="__tabbed_3" type="radio"/><input id="__tabbed_3_4" name="__tabbed_3" type="radio"/><input id="__tabbed_3_5" name="__tabbed_3" type="radio"/><input id="__tabbed_3_6" name="__tabbed_3" type="radio"/><input id="__tabbed_3_7" name="__tabbed_3" type="radio"/><input id="__tabbed_3_8" name="__tabbed_3" type="radio"/><input id="__tabbed_3_9" name="__tabbed_3" type="radio"/><input id="__tabbed_3_10" name="__tabbed_3" type="radio"/><input id="__tabbed_3_11" name="__tabbed_3" type="radio"/><input id="__tabbed_3_12" name="__tabbed_3" type="radio"/><input id="__tabbed_3_13" name="__tabbed_3" type="radio"/><div class="tabbed-labels"><label for="__tabbed_3_1">Python</label><label for="__tabbed_3_2">C++</label><label for="__tabbed_3_3">Java</label><label for="__tabbed_3_4">C#</label><label for="__tabbed_3_5">Go</label><label for="__tabbed_3_6">Swift</label><label for="__tabbed_3_7">JS</label><label for="__tabbed_3_8">TS</label><label for="__tabbed_3_9">Dart</label><label for="__tabbed_3_10">Rust</label><label for="__tabbed_3_11">C</label><label for="__tabbed_3_12">Kotlin</label><label for="__tabbed_3_13">Ruby</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
@@ -2549,8 +2549,8 @@
<h3 id="3-removing-a-node">3.   Removing a node<a class="headerlink" href="#3-removing-a-node" title="Permanent link"></a></h3>
<p>Removing a node is also straightforward: as shown in Figure 4-7, <strong>only one reference (pointer) needs to change</strong>.</p>
<p>Although <code>P</code> still points to <code>n1</code> after removal, traversing the list can no longer reach <code>P</code>. It therefore no longer belongs to the list.</p>
<p><ha-svg-figure class="animation-figure" data-book-key="en/chapter_array_and_linkedlist/linked_list.assets/linkedlist_remove_node.png" data-dark-src="/assets/figure-svg/figures/858279417caf518aefbf9126.json" data-src="/assets/figure-svg/figures/85abf374b0a55132469e9237.json" style=";--figure-ratio:960.0/540.0"><object data="/en/chapter_array_and_linkedlist/linked_list.assets/linkedlist_remove_node.svg" data-theme="light" tabindex="-1" type="image/svg+xml">Removing a linked list node</object><object data="/en/chapter_array_and_linkedlist/linked_list.assets/linkedlist_remove_node.dark.svg" data-theme="dark" tabindex="-1" type="image/svg+xml">Removing a linked list node</object></ha-svg-figure></p>
<p align="center"> Figure 4-7   Removing a linked list node </p>
<p><ha-svg-figure aria-label="Removing a linked list node" class="animation-figure" data-book-key="en/chapter_array_and_linkedlist/linked_list.assets/linkedlist_remove_node.png" data-dark-src="/assets/figure-svg/figures/858279417caf518aefbf9126.json" data-figure-accessible="" data-src="/assets/figure-svg/figures/85abf374b0a55132469e9237.json" role="img" style=";--figure-ratio:960.0/540.0"><object aria-hidden="true" data="/en/chapter_array_and_linkedlist/linked_list.assets/linkedlist_remove_node.svg" data-theme="light" inert="" tabindex="-1" type="image/svg+xml">Removing a linked list node</object><object aria-hidden="true" data="/en/chapter_array_and_linkedlist/linked_list.assets/linkedlist_remove_node.dark.svg" data-theme="dark" inert="" tabindex="-1" type="image/svg+xml">Removing a linked list node</object></ha-svg-figure></p>
<p align="center"> Figure 4-7   Removing a linked list node </p><div class="ha-sr-only figure-description"><h4>Description of Figure 4-7: Removing a linked list node</h4><p>Redirect the predecessor node's successor reference to bypass the node being removed.</p><p>The local sublist is n0 (1) → P (0) → n1 (3) → …. Given predecessor n0, the goal is to delete node P; n0 is not necessarily the head of the entire list.</p><p>The figure has upper and lower panels; after deletion, P and its arrow to n1 turn dashed and remain visible for comparison, while memory deallocation is not depicted.</p><p>After executing n0.next = n1, the main chain becomes n0 (1) → n1 (3) → …. Although P.next still points to n1, traversing forward from the list head through n0 can no longer reach P, so logical deletion is complete.</p><p>Given predecessor node n0, redirecting a single reference takes O(1) time and no other nodes need to move; the time to locate the predecessor is not included in this step.</p></div>
<div class="tabbed-set tabbed-alternate" data-tabs="4:13"><input checked="checked" id="__tabbed_4_1" name="__tabbed_4" type="radio"/><input id="__tabbed_4_2" name="__tabbed_4" type="radio"/><input id="__tabbed_4_3" name="__tabbed_4" type="radio"/><input id="__tabbed_4_4" name="__tabbed_4" type="radio"/><input id="__tabbed_4_5" name="__tabbed_4" type="radio"/><input id="__tabbed_4_6" name="__tabbed_4" type="radio"/><input id="__tabbed_4_7" name="__tabbed_4" type="radio"/><input id="__tabbed_4_8" name="__tabbed_4" type="radio"/><input id="__tabbed_4_9" name="__tabbed_4" type="radio"/><input id="__tabbed_4_10" name="__tabbed_4" type="radio"/><input id="__tabbed_4_11" name="__tabbed_4" type="radio"/><input id="__tabbed_4_12" name="__tabbed_4" type="radio"/><input id="__tabbed_4_13" name="__tabbed_4" type="radio"/><div class="tabbed-labels"><label for="__tabbed_4_1">Python</label><label for="__tabbed_4_2">C++</label><label for="__tabbed_4_3">Java</label><label for="__tabbed_4_4">C#</label><label for="__tabbed_4_5">Go</label><label for="__tabbed_4_6">Swift</label><label for="__tabbed_4_7">JS</label><label for="__tabbed_4_8">TS</label><label for="__tabbed_4_9">Dart</label><label for="__tabbed_4_10">Rust</label><label for="__tabbed_4_11">C</label><label for="__tabbed_4_12">Kotlin</label><label for="__tabbed_4_13">Ruby</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
@@ -3333,8 +3333,8 @@
</div>
</div>
</div>
<p><ha-svg-figure class="animation-figure" data-book-key="en/chapter_array_and_linkedlist/linked_list.assets/linkedlist_common_types.png" data-dark-src="/assets/figure-svg/figures/e9681b6eb93bd86ec95c9cbc.json" data-src="/assets/figure-svg/figures/1b880082bbd31f77d44a2d40.json" style=";--figure-ratio:960.0/540.0"><object data="/en/chapter_array_and_linkedlist/linked_list.assets/linkedlist_common_types.svg" data-theme="light" tabindex="-1" type="image/svg+xml">Common types of linked lists</object><object data="/en/chapter_array_and_linkedlist/linked_list.assets/linkedlist_common_types.dark.svg" data-theme="dark" tabindex="-1" type="image/svg+xml">Common types of linked lists</object></ha-svg-figure></p>
<p align="center"> Figure 4-8   Common types of linked lists </p>
<p><ha-svg-figure aria-label="Three common types of linked lists" class="animation-figure" data-book-key="en/chapter_array_and_linkedlist/linked_list.assets/linkedlist_common_types.png" data-dark-src="/assets/figure-svg/figures/e9681b6eb93bd86ec95c9cbc.json" data-figure-accessible="" data-src="/assets/figure-svg/figures/1b880082bbd31f77d44a2d40.json" role="img" style=";--figure-ratio:960.0/540.0"><object aria-hidden="true" data="/en/chapter_array_and_linkedlist/linked_list.assets/linkedlist_common_types.svg" data-theme="light" inert="" tabindex="-1" type="image/svg+xml">Common types of linked lists</object><object aria-hidden="true" data="/en/chapter_array_and_linkedlist/linked_list.assets/linkedlist_common_types.dark.svg" data-theme="dark" inert="" tabindex="-1" type="image/svg+xml">Common types of linked lists</object></ha-svg-figure></p>
<p align="center"> Figure 4-8   Common types of linked lists </p><div class="ha-sr-only figure-description"><h3>Description of Figure 4-8: Three common types of linked lists</h3><p>Compare the link structures of singly, circular, and doubly linked lists using the same nodes 1, 3, 2, 5, and 4.</p><p>All three rows use five nodes arranged in the order 1, 3, 2, 5, 4, comparing the three connection patterns from top to bottom.</p><table><caption>References and boundaries of the three linked list types</caption><thead><tr><th scope="col">Type and position</th><th scope="col">Between adjacent nodes</th><th scope="col">Head and tail boundaries</th></tr></thead><tbody><tr><th scope="row">Singly linked list, top</th><td>Rightward next: 1 → 3 → 2 → 5 → 4</td><td>Tail node 4 has next pointing to None</td></tr><tr><th scope="row">Circular linked list, middle</th><td>Rightward next: 1 → 3 → 2 → 5 → 4</td><td>Tail node 4 routes back beneath the row to node 1, forming a closed loop</td></tr><tr><th scope="row">Doubly linked list, bottom</th><td>Node order is 1, 3, 2, 5, 4; between every adjacent pair, rightward next points to the successor and leftward prev points to the predecessor</td><td>Node 1 has prev pointing to None on the left, and node 4 has next pointing to None on the right</td></tr></tbody></table><p>A singly linked list can only be traversed forward along successor references; in a circular linked list, any node can serve as the head; a doubly linked list can be traversed in both directions via next or prev, at the cost of storing an extra predecessor reference.</p></div>
<h2 id="424-typical-applications-of-linked-lists">4.2.4   Typical applications of linked lists<a class="headerlink" href="#424-typical-applications-of-linked-lists" title="Permanent link"></a></h2>
<p>Singly linked lists commonly implement stacks, queues, hash tables, and graphs.</p>
<ul>
@@ -3474,5 +3474,5 @@
<script src="../../javascripts/mathjax.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.2/es5/tex-mml-chtml.min.js"></script>
<script src="../../javascripts/animation_player.js"></script>
<script defer="" src="/assets/figure-svg/js/bcdea376f01bc2bc0cac7c6c.js"></script><script defer="" src="/assets/figure-svg/js/e84f59519170c0f5ef238548.js"></script><script defer="" src="/assets/figure-svg/js/a704d8e80a80ddc71f2a03a7.js"></script><script defer="" src="/assets/figure-svg/js/bff17b8259339758cb1c4a06.js"></script></body>
<script defer="" src="/assets/figure-svg/js/00174ff861e190f5c1f09e34.js"></script><script defer="" src="/assets/figure-svg/js/e84f59519170c0f5ef238548.js"></script><script defer="" src="/assets/figure-svg/js/a704d8e80a80ddc71f2a03a7.js"></script><script defer="" src="/assets/figure-svg/js/70ae82c6406c9bdbda8e8362.js"></script></body>
</html>

View File

@@ -1984,16 +1984,16 @@
<li><strong>RAM cannot readily replace disk storage</strong>. It loses data when power is removed, making it unsuitable for long-term storage. It also costs tens of times more than disk storage, making such a replacement impractical for consumers.</li>
<li><strong>Cache capacity and speed are difficult to maximize together</strong>. From L1 to L2 to L3, increasing capacity means greater physical size and distance from the CPU core, increasing transfer time and access latency. With current technology, a multilevel cache offers the best balance of capacity, speed, and cost.</li>
</ul>
<p><ha-svg-figure class="animation-figure" data-book-key="en/chapter_array_and_linkedlist/ram_and_cache.assets/storage_pyramid.png" data-dark-src="/assets/figure-svg/figures/a851a78864655573022491da.json" data-src="/assets/figure-svg/figures/590f85a25777d60c62a9ff3e.json" style=";--figure-ratio:960.0/540.0"><object data="/en/chapter_array_and_linkedlist/ram_and_cache.assets/storage_pyramid.svg" data-theme="light" tabindex="-1" type="image/svg+xml">Computer storage hierarchy</object><object data="/en/chapter_array_and_linkedlist/ram_and_cache.assets/storage_pyramid.dark.svg" data-theme="dark" tabindex="-1" type="image/svg+xml">Computer storage hierarchy</object></ha-svg-figure></p>
<p align="center"> Figure 4-9   Computer storage hierarchy </p>
<p><ha-svg-figure aria-label="Pyramid hierarchy of computer storage" class="animation-figure" data-book-key="en/chapter_array_and_linkedlist/ram_and_cache.assets/storage_pyramid.png" data-dark-src="/assets/figure-svg/figures/a851a78864655573022491da.json" data-figure-accessible="" data-src="/assets/figure-svg/figures/590f85a25777d60c62a9ff3e.json" role="img" style=";--figure-ratio:960.0/540.0"><object aria-hidden="true" data="/en/chapter_array_and_linkedlist/ram_and_cache.assets/storage_pyramid.svg" data-theme="light" inert="" tabindex="-1" type="image/svg+xml">Computer storage hierarchy</object><object aria-hidden="true" data="/en/chapter_array_and_linkedlist/ram_and_cache.assets/storage_pyramid.dark.svg" data-theme="dark" inert="" tabindex="-1" type="image/svg+xml">Computer storage hierarchy</object></ha-svg-figure></p>
<p align="center"> Figure 4-9   Computer storage hierarchy </p><div class="ha-sr-only figure-description"><h3>Description of Figure 4-9: Pyramid hierarchy of computer storage</h3><p>The storage pyramid compares speed, capacity, cost per unit capacity, and persistence across storage levels.</p><p>The pyramid widens from top to bottom across five levels. The top three levels sit inside a green box labeled CPU and are grouped on the left as "Cache"; the fourth level is labeled "Memory", and the fifth level is labeled "Disk".</p><table><caption>Five storage levels from top to bottom</caption><thead><tr><th scope="col">Level</th><th scope="col">Label in figure</th><th scope="col">Category</th></tr></thead><tbody><tr><th scope="row">1, top</th><td>L1 Cache</td><td>Cache inside CPU</td></tr><tr><th scope="row">2</th><td>L2 Cache</td><td>Cache inside CPU</td></tr><tr><th scope="row">3</th><td>L3 Cache</td><td>Cache inside CPU</td></tr><tr><th scope="row">4</th><td>RAM</td><td>Memory</td></tr><tr><th scope="row">5, bottom</th><td>HDD/SSD</td><td>Disk</td></tr></tbody></table><p>On the right, the upward arrow is labeled "Speed, Cost": higher levels provide faster access at higher cost per unit capacity. The downward arrow is labeled "Capacity, Persistence": lower levels offer larger capacity, and HDD/SSD at the bottom retains data long term without power. Cache and memory are volatile storage and lose data when power is removed.</p></div>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>The storage hierarchy balances speed, capacity, and cost. Such tradeoffs occur throughout industry, requiring us to find the best balance among competing strengths and limitations.</p>
</div>
<p>In general, <strong>disks store large amounts of data long term, RAM temporarily holds data being processed, and caches hold frequently accessed data and instructions</strong> to speed up execution. The three work together to keep the computer efficient.</p>
<p>As shown in Figure 4-10, a running program reads data from disk into RAM for the CPU to process. The cache can be viewed as part of the CPU: <strong>it intelligently loads data from RAM</strong> and provides faster access, improving execution speed and reducing dependence on slower memory.</p>
<p><ha-svg-figure class="animation-figure" data-book-key="en/chapter_array_and_linkedlist/ram_and_cache.assets/computer_storage_devices.png" data-dark-src="/assets/figure-svg/figures/c810f9f9912b8d54973c9df7.json" data-src="/assets/figure-svg/figures/3f9b3b8ff48b1389e03f2fd9.json" style=";--figure-ratio:960.0/540.0"><object data="/en/chapter_array_and_linkedlist/ram_and_cache.assets/computer_storage_devices.svg" data-theme="light" tabindex="-1" type="image/svg+xml">Data flow between disk, RAM, and cache</object><object data="/en/chapter_array_and_linkedlist/ram_and_cache.assets/computer_storage_devices.dark.svg" data-theme="dark" tabindex="-1" type="image/svg+xml">Data flow between disk, RAM, and cache</object></ha-svg-figure></p>
<p align="center"> Figure 4-10   Data flow between disk, RAM, and cache </p>
<p><ha-svg-figure aria-label="Data flow between disk, memory, and cache" class="animation-figure" data-book-key="en/chapter_array_and_linkedlist/ram_and_cache.assets/computer_storage_devices.png" data-dark-src="/assets/figure-svg/figures/c810f9f9912b8d54973c9df7.json" data-figure-accessible="" data-src="/assets/figure-svg/figures/3f9b3b8ff48b1389e03f2fd9.json" role="img" style=";--figure-ratio:960.0/540.0"><object aria-hidden="true" data="/en/chapter_array_and_linkedlist/ram_and_cache.assets/computer_storage_devices.svg" data-theme="light" inert="" tabindex="-1" type="image/svg+xml">Data flow between disk, RAM, and cache</object><object aria-hidden="true" data="/en/chapter_array_and_linkedlist/ram_and_cache.assets/computer_storage_devices.dark.svg" data-theme="dark" inert="" tabindex="-1" type="image/svg+xml">Data flow between disk, RAM, and cache</object></ha-svg-figure></p>
<p align="center"> Figure 4-10   Data flow between disk, RAM, and cache </p><div class="ha-sr-only figure-description"><h3>Description of Figure 4-10: Data flow between disk, memory, and cache</h3><p>The processor, cache, memory, and disk work together through bidirectional data flows.</p><p>From left to right are CPU, Memory, and Disk. Inside the green CPU box, Processor is on the left and Cache is on the right. Between each of the three adjacent pairs—Processor and Cache, Cache and Memory, and Memory and Disk—sit two horizontal arrows stacked vertically: the upper arrow points right and the lower arrow points left.</p><p>Above the boxes, two bent arrows bypass Cache, one pointing from Processor to Memory and the other from Memory to Processor. Together these connections represent bidirectional read and write paths.</p><p>As the chapter explains, the disk stores data long term. Data needed at runtime is loaded into memory. The CPU cache holds frequently accessed data and instructions so the processor makes fewer trips to slower memory.</p></div>
<h2 id="442-memory-efficiency-of-data-structures">4.4.2   Memory efficiency of data structures<a class="headerlink" href="#442-memory-efficiency-of-data-structures" title="Permanent link"></a></h2>
<p>Arrays and linked lists each have strengths and limitations in memory use.</p>
<p>On one hand, <strong>memory is finite, and the same region cannot be shared by multiple programs</strong>, so data structures should use it efficiently. Arrays pack elements tightly without extra references (pointers) between nodes, making them more space-efficient. However, they require a sufficiently large contiguous allocation, which can waste memory, and expansion costs extra time and space. Linked lists instead allocate and reclaim memory node by node, providing greater flexibility.</p>
@@ -2142,5 +2142,5 @@
<script src="../../javascripts/mathjax.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.2/es5/tex-mml-chtml.min.js"></script>
<script src="../../javascripts/animation_player.js"></script>
<script defer="" src="/assets/figure-svg/js/bcdea376f01bc2bc0cac7c6c.js"></script><script defer="" src="/assets/figure-svg/js/e84f59519170c0f5ef238548.js"></script><script defer="" src="/assets/figure-svg/js/a704d8e80a80ddc71f2a03a7.js"></script><script defer="" src="/assets/figure-svg/js/bff17b8259339758cb1c4a06.js"></script></body>
<script defer="" src="/assets/figure-svg/js/00174ff861e190f5c1f09e34.js"></script><script defer="" src="/assets/figure-svg/js/e84f59519170c0f5ef238548.js"></script><script defer="" src="/assets/figure-svg/js/a704d8e80a80ddc71f2a03a7.js"></script><script defer="" src="/assets/figure-svg/js/70ae82c6406c9bdbda8e8362.js"></script></body>
</html>