· 3 min read

How to Memorize Sorting, Searching & Graph Algorithms with 96 Flashcards

Drill 96 flashcards on quicksort, merge sort, heapsort, Timsort, binary search, Dijkstra, Bellman-Ford, Kruskal and A* from deck GF1576, with a one-week plan.

Illustration of a glowing graph of connected nodes, sorted bars and a magnifying glass surrounded by floating flashcards

Studying. But it's also a video game. 🎮

Flashcards, quizzes and games that make you actually remember.

Start playing — it's free

Posted by

Most people revise algorithms by re-reading a textbook chapter, then blank on "what is the space complexity of heapsort?" in the interview. The fix is to drill the facts as questions. Deck GF1576 – Algorithms: Sorting, Searching & Graphs on Flip It does exactly that with 96 flashcards, roughly half on sorting and half on searching and graph algorithms.

Study this deck: Algorithms: Sorting, Searching & Graphs

1 / 10
Question

Sorting algorithm

Knew itLearning

Tap the card for the answer · swipe right if you knew it, left if not

Ten cards from the deck

FrontBack
Worst-case time complexity of quicksortO(n²), when the pivot choices are consistently poor
Is heapsort stable?No
Memory complexity of merge sortO(n) additional space for simple implementations
Key characteristic of selection sortIt makes exactly n swaps, useful when swapping is very expensive
Time complexity of radix sortO(n · k), n elements and k digits
What data structure does Kruskal's algorithm typically use?A union-find (disjoint set) structure to detect cycles
Time complexity of Dijkstra's algorithm with a binary heapO((V + E) log V)
What advantage does Bellman-Ford have over Dijkstra?It handles graphs with negative edge weights
Admissibility property of a heuristicIt never overestimates the true cost to reach the goal
Floyd's cycle-finding algorithmThe tortoise-and-hare algorithm, two pointers moving at different speeds

Everything the 96 cards cover

Sorting (46 cards): definitions of stable, in-place, adaptive, online and comparison vs non-comparison sorts; bubble sort, insertion sort, selection sort, shellsort, comb sort, quicksort and its partition step, merge sort, heapsort, smoothsort, block sort, library sort, Timsort (used by Python and Java), introsort and Musser's 1.5 log₂(n) depth limit, counting sort, radix sort (LSD/MSD), bucket sort, distribution sort, external sorting, tag sort, the Three Hungarians' parallel merge, plus the curiosities bogosort and stooge sort (O(n^2.7095)). Selection is covered too: quickselect, median of medians, and the Fisher-Yates shuffle.

Searching (about 10 cards): linear search O(n), binary search O(log n), jump search, interpolation search, ternary search, best-first search O(b^d), uniform-cost search, beam search, bidirectional search, iterative deepening DFS, backtracking, heuristics and the complete vs optimal distinction.

Graphs (about 40 cards): BFS with a queue, DFS with a stack, Dijkstra, Bellman-Ford, Floyd-Warshall O(V³), Johnson's algorithm, A*, minimum spanning trees with Prim, Kruskal and Borůvka, topological sorting on a DAG, strongly connected components with Tarjan and Kosaraju, max flow with Ford-Fulkerson and Edmonds-Karp O(VE²), bipartite graphs and the Hungarian algorithm, cliques and Bron-Kerbosch, PageRank, Girvan-Newman community detection, the traveling salesman problem and its nearest-neighbor heuristic, and cycle detection.

How to memorize it in a week

  • Days 1-2, sorting. Before flipping each complexity card, say the algorithm's best, average and worst case out loud. The deck asks for one; you answer with three, and the extra retrieval sticks.
  • Days 3-4, graphs. Group the cards by problem, not by name: shortest path (Dijkstra, Bellman-Ford, Floyd-Warshall, Johnson, A*), spanning tree (Prim, Kruskal, Borůvka), components (Tarjan, Kosaraju), flow (Ford-Fulkerson, Edmonds-Karp). Interviewers ask "which algorithm would you use for X?", and this grouping is that question in reverse.
  • Days 5-7, mixed reviews. Let Flip It's spaced repetition surface the cards you missed; the search cards are few enough to fold in here.

Two traps this deck will catch

The "which data structure" cards are the easiest points to lose. BFS → queue, DFS → stack, heapsort → heap, Kruskal → union-find, Dijkstra → binary heap. Five cards, five one-word answers, and they come up in nearly every technical screen.

Stability is not a detail. The deck has three separate cards on it (definition, why it matters, and heapsort's lack of it). Remember the example on the card: sort students by name, then by class section, and a stable sort keeps the names alphabetical inside each section. Merge sort and Timsort are stable; quicksort, heapsort and selection sort are not.

Once the algorithms are solid, Memorize Python Data Structures & Comprehensions covers the lists, dicts and sets you'll implement them with.

Log in to Flip It, find GF1576 in the library, and start with the sorting half tonight.

Ready to learn faster? 🚀

Join FLIP IT for free and turn studying into a game.

Create my free account