Flashcards › Technology & Coding › Computer Science

Data Structures

Ways of organizing data: arrays, lists, stacks, queues, trees, graphs and hash tables.

69 cardsGrades 9–12, College, Adult#data structures#arrays#trees#graphs

0 of 69 known
69 cards
  • Data structureStructure
    A way of organizing data so it can be used efficiently
  • ArrayStructure
    A fixed-size list of items stored in order, accessed by index
  • IndexStructure
    The position number of an item in an array, starting at 0 in most languages
  • Dynamic arrayStructure
    An array that grows automatically, like a Python list
  • Linked listStructure
    Items (nodes) linked by pointers, each pointing to the next
  • NodeStructure
    A piece of a linked structure holding data and links
  • Singly linked listStructure
    Each node points only to the next
  • Doubly linked listStructure
    Each node points to both the next and the previous
  • Pointer (reference)Structure
    A value that tells where another value is stored
  • StackStructure
    A last-in, first-out (LIFO) structure
  • PushStructure
    Add an item to a stack
  • PopStructure
    Remove the top item from a stack
  • PeekStructure
    Look at the top item without removing it
  • QueueStructure
    A first-in, first-out (FIFO) structure
  • EnqueueStructure
    Add an item to the back of a queue
  • DequeueStructure
    Remove the item at the front of a queue
  • DequeStructure
    A double-ended queue; add or remove at either end
  • Priority queueStructure
    A queue where higher priority items leave first
  • Hash table (hash map)Structure
    Stores key-value pairs for fast lookup using a hash function
  • Hash functionStructure
    Converts a key into a number to find its slot
  • SetStructure
    A collection of unique items
  • Dictionary (map)Structure
    A collection of key-value pairs
  • TupleStructure
    An ordered, unchangeable group of values
  • TreeStructure
    A hierarchy of nodes with a root and branches
  • RootStructure
    The top node of a tree
  • LeafStructure
    A node with no children
  • Parent and childStructure
    A node and the nodes directly below it
  • DepthStructure
    How many steps a node is from the root
  • Height of a treeStructure
    The longest path from the root to a leaf
  • Binary treeStructure
    A tree in which each node has at most two children
  • Binary search tree (BST)Structure
    A binary tree where left values are smaller and right values are larger
  • Balanced treeStructure
    A tree whose branches are roughly equal in height
  • AVL treeStructure
    A self-balancing binary search tree
  • HeapStructure
    A tree-based structure where the parent is always larger (or smaller) than its children
  • Min-heapStructure
    The smallest element is at the top
  • Max-heapStructure
    The largest element is at the top
  • TrieStructure
    A tree for storing words by their letters
  • GraphStructure
    Nodes (vertices) connected by edges
  • VertexStructure
    A node in a graph
  • EdgeStructure
    A connection between two vertices
  • Directed graphStructure
    Edges have a direction
  • Undirected graphStructure
    Edges go both ways
  • Weighted graphStructure
    Edges have values like distance or cost
  • Adjacency listStructure
    Graph stored as a list of neighbors for each vertex
  • Adjacency matrixStructure
    Graph stored as a grid showing which vertices connect
  • CycleStructure
    A path that returns to its starting vertex
  • Tree vs graphStructure
    A tree is a graph with no cycles that is connected
  • Record (struct)Structure
    A bundle of named fields
  • StringStructure
    A sequence of characters
  • MatrixStructure
    A grid of values in rows and columns
  • 2D arrayStructure
    An array of arrays, like a grid
  • Stack useStructure
    Undo buttons, function calls, browser back
  • Queue useStructure
    Print jobs, task scheduling
  • Hash table useStructure
    Fast lookups, caches, counting
  • Tree useStructure
    File systems, search, hierarchies
  • Graph useStructure
    Maps, social networks, the internet
  • Access time of an array by indexStructure
    O(1)
  • Search time in an unsorted arrayStructure
    O(n)
  • Insertion at the front of a linked listStructure
    O(1)
  • Search time in a balanced BSTStructure
    O(log n)
  • Average lookup in a hash tableStructure
    O(1)
  • Call stackStructure
    The stack that tracks which function is running
  • Stack overflowStructure
    When the call stack runs out of space, often from endless recursion
  • Abstract data type (ADT)Structure
    A description of what a structure does, not how
  • Circular bufferStructure
    A fixed-size queue that wraps around
  • Bloom filterStructure
    A compact structure that tells if an item might be in a set
  • Union-findStructure
    A structure that tracks groups of connected items
  • ImmutableStructure
    Cannot be changed after creation
  • MutableStructure
    Can be changed after creation

Download this deck

Want paper cards? Paste the plain-text download into the flashcard maker.

More Computer Science decks