Linked List fetch modus?
Linked List fetch modus?
For various reasons I will not elaborate on, I have been considering what a linked list fetch modus looks like for a sylladex. For those who do not involve themselves in the sacred arts of data structures, a linked list is a type of data structure using nodes and pointers, where each node contains some data, and a pointer pointing to the next node in the list. Generally, there are separate pointers pointing to the first and last node in the list; these aren't nodes themselves, just vague ambigious non-entities that do nothing but reference the first and last nodes (head and tail respectively). There are also doubly linked lists in which each node points to the previous and the next node, and circular linked lists, wherein the last node points back to the first node. An advantage to this type of data structure is that nodes can be placed anywhere in the linked list rather easily. For example, in a singly linked list, node 3 just needs to point to the new node, and the new node to node 4, and suddenly the new node is part of the linked list.
My initial guess is that for a linked list modus, each card is a node. When an item is first picked up, this becomes the head (first node) card, and then subsequent items retrieved follow after the head card. Cards at the head and tail (last node) can be accessed freely, while cards in the middle need to be accessed by using each card before it (forward traversal through the linked list) or after it (backwards traversal through the linked list) in subsequent order. However, new items do not necessarily need to be added at the end or beginning of the list; if there are unused cards, the item can be placed anywhere in the linked list at will without much hassle. if there are no nodes (cards) available and a new item is picked up, the card at the end of the list is ejected.
My only problem with this is that it's essentially just the queuestack type that john makes in act 2 i believe, except with the added mechanic of new items being placed in the middle of the queuestack instead of either the top or bottom. Also, to be really accurate to linked lists, the data (item) in each node (card) doesn't need to be accessed for traversal, just the pointer to the next node. If that's the case for the modus, then it's no different from an array modus, where any item at any position can be retrieved at will. What do you all think?