Artifact Content

Artifact 97b2bac950a5c04b34f6d7a8550ac0b0fd51cb5a:

Wiki page [Singly-Linked List] by Entomy 2017-03-22 21:56:12.
D 2017-03-22T21:56:12.745
L Singly-Linked\sList
P 2d772a623b68f9cbd17c7fd6a5d78998ee751660
U Entomy
W 1340
<h1>Purpose</h1>
<p>Sometimes the overhead of larger containers isn't justifiable, and so the smaller node of the Singly-Linked List is advantageous.</p>
<p>This is also fundamentally how the [Stack] and [Queue] work, although this List has more overhead than either of those, but provides more features.</p>

<h1>Notable Features</h1>
<h2>Non-Deallocative Traversal</h2>
<p>Traversal between nodes of any list type does not remove the previous node, so they behave more like arrays.</p>
<h2>Insertion</h2>
<p>Unlike the [Stack] or [Queue], or the Array, nodes can be inserted inside the list without requiring a new list.</p>
<h2>Queries</h2>
<p>Some queries are possible upon this generalized list, and are made available here. Whether a list contains a value, all instances of a certain value, former N values, hinder N values, and so on. All of these queries either return a boolean or another list which can be queried.</p>

<h1>Considerations</h1>
<p>Use of an iterator is slower than traversal through <code>Node.Ahind</code>, due to the implementation. This is because the list operations largely operate on nodes themselves, not on a cursor, so the cursor heavy iterator has additional overhead. Being simpler, iterators are good for prototyping or when performance doesn't matter, but manual traversal is advised.</p>
Z da2471bfa2dd7d8bbf672c90e26363db