Please enable JavaScript.
Coggle requires JavaScript to display documents.
1.1 Data Structures (Terms (Identifier - Name of the data structure,…
1.1 Data Structures
-
Other types
Hash Table - A list where each piece of data undergoes an algorithm to give it a position. To access that piece of data, the same key is needed.
Linked list - A one-dimensional array, where each item contains two parts, a value and a pointer. The pointer contains the index of the next value.
Record - A list which can store multiple different data types. It does this by storing the data and the data type together, like a table with two columns.
Stack - A list which adds new values to the top of the stack, and can only interact with that top value (LIFO). Eg. Voicemail
Queue - A list, where items are added to the back of the queue, but the front is edited (FIFO). Eg. Printer queue
Trees
Tree - Starting at the root node, other nodes are branched off to form a tree. This is useful for grouping together data in a hierarchy.
Binary tree - A type of tree, which only allows up to 2 branches per node
Ordering Binary Trees - These can be sorted by First Order (Left), In-Order (Below) and Post Order (Right)
Removing Data - If the node has 2 branches, replace with the smaller node and update its pointers
Arrays
-
-
-
Arrays are static (Size can't be altered once they have been created). This is usually a good thing, as it means memory isn't wasted with empty elements.