Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Let's think for a moment. We have two fundamental storage disciplines. Contiguous and Fragmented.</p> <p>Contiguous. </p> <ul> <li><p><strong>Stack</strong> is constrained by order. Last in First Out. The nesting contexts of function calls demand this.</p></li> <li><p>We can easily invert this pattern to define a <strong>Queue</strong>. First in First Out. </p></li> <li><p>We can add a bound to the queue to make a <strong>Circular Queue</strong>. Input-output processing demands this.</p></li> <li><p>We can combine both constraints into a <strong>Dequeue</strong>. </p></li> <li><p>We can add a key and ordering to a queue to create a <strong>Priority Queue</strong>. The OS Scheduler demands this.</p> <p>So. That's a bunch of variations on contiguous structures constrained by entry order. And there are multiple implementations of these.</p></li> <li><p>You can have contiguous storage unconstrained by entry order: <strong>Array</strong> and <strong>Hash</strong>. An array is indexed by "position", a hash is indexed by a hash function of a Key. </p></li> </ul> <p>Fragmented:</p> <ul> <li><p>The bare "heap" is fragmented storage with no relationships. This is the usual approach.</p></li> <li><p>You can have heap storage using handles to allow relocation. The old Mac OS used to do this.</p></li> </ul> <p>You can have fragmented storage with relationships -- lists and trees and the like.</p> <ul> <li><p><strong>Linked Lists</strong>. Single-linked and doubly-linked lists are implementation choices.</p></li> <li><p><strong>Binary Trees</strong> have 0, 1 or 2 children.</p></li> <li><p>Higher-order trees. <strong>Tries</strong> and the like.</p></li> </ul> <p>What are we up to? A dozen? </p> <p>You can also look at this as "collections" which exist irrespective of the storage. In this case you mix storage discipline (heapish or array-ish)</p> <p>Bags: unordered collections with duplicates allowed. You can have a bag built on a number of storage disciplines: LinkedBag, TreeBag, ArrayBag, HashBag. The link and tree use fragmented storage, the array and hash use contiguous storage. </p> <p>Sets: unordered collections with no duplicates. No indexing. Again: LinkedSet, TreeSet, ArraySet, HashSet. </p> <p>Lists: ordered collections. Indexed by position. Again: LinkedList, TreeList, ArrayList, HashList.</p> <p>Mapping: key-value association collections. Indexed by key. LinkedMap, TreeMap, ArrayMap, HashMap.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload