Educational Cards
Learn from video content, text, and interactive tasks
Filters
Coarse Open Addressing
Open addressing stores entries directly in the table and searches for alternative slots in case of...
State Space and Cuts
Pruning cuts off branches that can no longer reach a valid solution. Early conflict tests save...
Recursion with Decision
Pattern: for each option: if valid: apply; if solve(): return true; undo; return false. Base case:...
Backtracking: Attempt and Reversion
Backtracking explores a decision tree: make a choice, proceed recursively, undo the choice, try the...
n-Queens Idea
n-Queens: Place n queens such that no two threaten each other (same row, column, diagonal)....
Mutable State and Undo
Often, a shared board array is mutated: set field, recursive call, reset field. An alternative is...
Small Implementation: Subset Sum
Classic subproblem: is there a subset with a given sum? Decide for each element: take it or leave...
Graphs: Adjacency List
A graph consists of nodes and edges. A node-based adjacency representation stores the list of...
Weighted Edges and Dijkstra's Idea
Dijkstra finds the shortest paths for non-negative edge weights. A PriorityQueue selects the next...
BFS and Queue
BFS explores in layers: a queue holds the frontier. Marking visited nodes prevents multiple visits....
DFS and Recursion
DFS goes deep: Recursion or explicit stack. Useful for connectivity, cycle detection, and...
Short implementation: Count neighbors
Small implementation exercise: The degree of a node in an adjacency list is the length of its...