Flashcards › Technology & Coding › Computer Science
Data Structures
Ways of organizing data: arrays, lists, stacks, queues, trees, graphs and hash tables.
0 of 69 known
69 cards
- Data structureStructureA way of organizing data so it can be used efficiently
- ArrayStructureA fixed-size list of items stored in order, accessed by index
- IndexStructureThe position number of an item in an array, starting at 0 in most languages
- Dynamic arrayStructureAn array that grows automatically, like a Python list
- Linked listStructureItems (nodes) linked by pointers, each pointing to the next
- NodeStructureA piece of a linked structure holding data and links
- Singly linked listStructureEach node points only to the next
- Doubly linked listStructureEach node points to both the next and the previous
- Pointer (reference)StructureA value that tells where another value is stored
- StackStructureA last-in, first-out (LIFO) structure
- PushStructureAdd an item to a stack
- PopStructureRemove the top item from a stack
- PeekStructureLook at the top item without removing it
- QueueStructureA first-in, first-out (FIFO) structure
- EnqueueStructureAdd an item to the back of a queue
- DequeueStructureRemove the item at the front of a queue
- DequeStructureA double-ended queue; add or remove at either end
- Priority queueStructureA queue where higher priority items leave first
- Hash table (hash map)StructureStores key-value pairs for fast lookup using a hash function
- Hash functionStructureConverts a key into a number to find its slot
- SetStructureA collection of unique items
- Dictionary (map)StructureA collection of key-value pairs
- TupleStructureAn ordered, unchangeable group of values
- TreeStructureA hierarchy of nodes with a root and branches
- RootStructureThe top node of a tree
- LeafStructureA node with no children
- Parent and childStructureA node and the nodes directly below it
- DepthStructureHow many steps a node is from the root
- Height of a treeStructureThe longest path from the root to a leaf
- Binary treeStructureA tree in which each node has at most two children
- Binary search tree (BST)StructureA binary tree where left values are smaller and right values are larger
- Balanced treeStructureA tree whose branches are roughly equal in height
- AVL treeStructureA self-balancing binary search tree
- HeapStructureA tree-based structure where the parent is always larger (or smaller) than its children
- Min-heapStructureThe smallest element is at the top
- Max-heapStructureThe largest element is at the top
- TrieStructureA tree for storing words by their letters
- GraphStructureNodes (vertices) connected by edges
- VertexStructureA node in a graph
- EdgeStructureA connection between two vertices
- Directed graphStructureEdges have a direction
- Undirected graphStructureEdges go both ways
- Weighted graphStructureEdges have values like distance or cost
- Adjacency listStructureGraph stored as a list of neighbors for each vertex
- Adjacency matrixStructureGraph stored as a grid showing which vertices connect
- CycleStructureA path that returns to its starting vertex
- Tree vs graphStructureA tree is a graph with no cycles that is connected
- Record (struct)StructureA bundle of named fields
- StringStructureA sequence of characters
- MatrixStructureA grid of values in rows and columns
- 2D arrayStructureAn array of arrays, like a grid
- Stack useStructureUndo buttons, function calls, browser back
- Queue useStructurePrint jobs, task scheduling
- Hash table useStructureFast lookups, caches, counting
- Tree useStructureFile systems, search, hierarchies
- Graph useStructureMaps, social networks, the internet
- Access time of an array by indexStructureO(1)
- Search time in an unsorted arrayStructureO(n)
- Insertion at the front of a linked listStructureO(1)
- Search time in a balanced BSTStructureO(log n)
- Average lookup in a hash tableStructureO(1)
- Call stackStructureThe stack that tracks which function is running
- Stack overflowStructureWhen the call stack runs out of space, often from endless recursion
- Abstract data type (ADT)StructureA description of what a structure does, not how
- Circular bufferStructureA fixed-size queue that wraps around
- Bloom filterStructureA compact structure that tells if an item might be in a set
- Union-findStructureA structure that tracks groups of connected items
- ImmutableStructureCannot be changed after creation
- MutableStructureCan be changed after creation
Download this deck
- CSVExcel, Google Sheets, Numbers
- Anki / Quizlet (tab-separated)Import straight into Anki or Quizlet
- JSONFor programmers and apps
- Plain textOne card a line, “front : back”, ready for Peabody's flashcard maker to print
Want paper cards? Paste the plain-text download into the flashcard maker.