mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-11 23:16:07 +00:00
deploy
This commit is contained in:
@@ -3599,15 +3599,14 @@
|
||||
<li><strong>Linear data structures</strong>: Arrays, Linked Lists, Stacks, Queues, Hash Tables.</li>
|
||||
<li><strong>Non-linear data structures</strong>: Trees, Heaps, Graphs, Hash Tables.</li>
|
||||
</ul>
|
||||
<p><a class="glightbox" href="../classification_of_data_structure.assets/classification_logic_structure.png" data-type="image" data-width="100%" data-height="auto" data-desc-position="bottom"><img alt="Linear and non-linear data structures" class="animation-figure" src="../classification_of_data_structure.assets/classification_logic_structure.png" /></a></p>
|
||||
<p align="center"> Figure 3-1 Linear and non-linear data structures </p>
|
||||
|
||||
<p>Non-linear data structures can be further divided into tree structures and network structures.</p>
|
||||
<ul>
|
||||
<li><strong>Linear structures</strong>: Arrays, linked lists, queues, stacks, and hash tables, where elements have a one-to-one sequential relationship.</li>
|
||||
<li><strong>Tree structures</strong>: Trees, Heaps, Hash Tables, where elements have a one-to-many relationship.</li>
|
||||
<li><strong>Network structures</strong>: Graphs, where elements have a many-to-many relationships.</li>
|
||||
</ul>
|
||||
<p><a class="glightbox" href="../classification_of_data_structure.assets/classification_logic_structure.png" data-type="image" data-width="100%" data-height="auto" data-desc-position="bottom"><img alt="Linear and non-linear data structures" class="animation-figure" src="../classification_of_data_structure.assets/classification_logic_structure.png" /></a></p>
|
||||
<p align="center"> Figure 3-1 Linear and non-linear data structures </p>
|
||||
|
||||
<h2 id="312-physical-structure-contiguous-and-dispersed">3.1.2 Physical structure: contiguous and dispersed<a class="headerlink" href="#312-physical-structure-contiguous-and-dispersed" title="Permanent link">¶</a></h2>
|
||||
<p><strong>During the execution of an algorithm, the data being processed is stored in memory</strong>. Figure 3-2 shows a computer memory stick where each black square is a physical memory space. We can think of memory as a vast Excel spreadsheet, with each cell capable of storing a certain amount of data.</p>
|
||||
<p><strong>The system accesses the data at the target location by means of a memory address</strong>. As shown in Figure 3-2, the computer assigns a unique identifier to each cell in the table according to specific rules, ensuring that each memory space has a unique memory address. With these addresses, the program can access the data stored in memory.</p>
|
||||
@@ -3623,9 +3622,11 @@
|
||||
<p><a class="glightbox" href="../classification_of_data_structure.assets/classification_phisical_structure.png" data-type="image" data-width="100%" data-height="auto" data-desc-position="bottom"><img alt="Contiguous space storage and dispersed space storage" class="animation-figure" src="../classification_of_data_structure.assets/classification_phisical_structure.png" /></a></p>
|
||||
<p align="center"> Figure 3-3 Contiguous space storage and dispersed space storage </p>
|
||||
|
||||
<p><strong>It is worth noting that all data structures are implemented based on arrays, linked lists, or a combination of both</strong>. For example, stacks and queues can be implemented using either arrays or linked lists; while implementations of hash tables may involve both arrays and linked lists.
|
||||
- <strong>Array-based implementations</strong>: Stacks, Queues, Hash Tables, Trees, Heaps, Graphs, Matrices, Tensors (arrays with dimensions <span class="arithmatex">\(\geq 3\)</span>).
|
||||
- <strong>Linked-list-based implementations</strong>: Stacks, Queues, Hash Tables, Trees, Heaps, Graphs, etc.</p>
|
||||
<p><strong>It is worth noting that all data structures are implemented based on arrays, linked lists, or a combination of both</strong>. For example, stacks and queues can be implemented using either arrays or linked lists; while implementations of hash tables may involve both arrays and linked lists.</p>
|
||||
<ul>
|
||||
<li><strong>Array-based implementations</strong>: Stacks, Queues, Hash Tables, Trees, Heaps, Graphs, Matrices, Tensors (arrays with dimensions <span class="arithmatex">\(\geq 3\)</span>).</li>
|
||||
<li><strong>Linked-list-based implementations</strong>: Stacks, Queues, Hash Tables, Trees, Heaps, Graphs, etc.</li>
|
||||
</ul>
|
||||
<p>Data structures implemented based on arrays are also called “Static Data Structures,” meaning their length cannot be changed after initialization. Conversely, those based on linked lists are called “Dynamic Data Structures,” which can still adjust their size during program execution.</p>
|
||||
<div class="admonition tip">
|
||||
<p class="admonition-title">Tip</p>
|
||||
@@ -3818,7 +3819,7 @@ aria-label="Footer"
|
||||
<div class="md-copyright">
|
||||
|
||||
<div class="md-copyright__highlight">
|
||||
Copyright © 2022-2024 krahets<br>The website content is licensed under <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a>
|
||||
Copyright © 2024 krahets<br>The website content is licensed under <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user