Data structures and algorithms are the backbone of technical interviews at every major tech company, and this deck of 20 flashcards introduces the concepts you'll be expected to know. You'll start with Big O notation and how to reason about time and space comp...
Data structures and algorithms are the backbone of technical interviews at every major tech company, and this deck of 20 flashcards introduces the concepts you'll be expected to know. You'll start with Big O notation and how to reason about time and space complexity, then cover the core data structures — arrays, linked lists, stacks, queues, hash tables and binary search trees — comparing their strengths and trade-offs. The deck moves into algorithmic thinking with recursion, binary search, and the classic sorting algorithms (bubble sort, merge sort, quicksort), finishing with graph traversal methods (depth-first and breadth-first search). Suited to computer science coursework and coding interview preparation, this deck focuses on building the conceptual vocabulary and complexity intuition that lets you discuss trade-offs clearly, whether you're solving a whiteboard problem or reviewing a teammate's pull request.
Ready to test yourself?
Flip through all 20 cards in interactive study mode.
A way of organising and storing data so it can be accessed and modified efficiently for a given task.
Describing the upper-bound growth rate of an algorithm's time or space requirements as input size increases, used to compare algorithm efficiency.
O(1) — constant time, since arrays allow direct indexed access to any element.
A linear data structure where each element (node) contains data and a reference (pointer) to the next node, allowing efficient insertion/deletion but only sequential access.
Arrays have fixed contiguous memory and O(1) indexed access. Linked lists have dynamically allocated nodes and O(n) access, but O(1) insertion/deletion at known positions.
A linear data structure following LIFO (Last In, First Out) — the most recently added element is the first removed, like a stack of plates.
A linear data structure following FIFO (First In, First Out) — the first element added is the first removed, like a line of people.
push (add to top), pop (remove from top), and peek/top (view the top element without removing it).
A data structure that maps keys to values using a hash function, offering average O(1) time complexity for insertion, deletion and lookup.
A tree data structure where each node has at most two children, commonly referred to as the left and right child.
A binary tree where, for every node, all values in the left subtree are smaller and all values in the right subtree are larger, enabling efficient O(log n) search.
A programming technique where a function calls itself to solve smaller instances of the same problem, requiring a base case to terminate.
Repeatedly divides a sorted array in half, comparing the target to the middle element, discarding the half that can't contain it — achieving O(log n) time complexity.
Repeatedly compares and swaps adjacent elements if they're in the wrong order, passing through the list multiple times — O(n²) time complexity, inefficient for large datasets.
A divide-and-conquer algorithm that recursively splits the array in half, sorts each half, then merges them back together — O(n log n) time complexity.
A divide-and-conquer algorithm that selects a "pivot" element, partitions the array around it, then recursively sorts the partitions — average O(n log n), worst case O(n²).
DFS explores as far as possible along each branch before backtracking (uses a stack/recursion). BFS explores all neighbours at the current depth before going deeper (uses a queue).
A collection of nodes (vertices) connected by edges, used to represent networks like social connections, maps, or dependencies.
The amount of memory an algorithm requires relative to its input size, expressed using the same Big O notation as time complexity.
It provides a standardised way to discuss and compare the efficiency and scalability of different algorithmic solutions to the same problem.