Backtracking Algorithms
Algorithms that explore candidates and abandon partial solutions.
Algorithms that explore candidates and abandon partial solutions.
Classic problems solved by backtracking: N-Queens, Sudoku, subset sum, graph coloring, Hamiltonian cycles and maze solving, extended with permutations, combination sum, word search, the knight's tour, palindrome partitioning and generating parentheses.
| Problem | Description |
|---|---|
| N-Queens | Place N non-attacking queens on an NxN chessboard. |
| Sudoku Solver | Fill a 9x9 grid satisfying row, column, and box constraints. |
| Subset Sum | Find a subset whose sum equals a target value. |
| Graph Coloring | Assign colors to vertices so adjacent vertices differ. |
| Hamiltonian Cycle | Find a cycle that visits every vertex exactly once. |
| Maze Solving | Find a path from start to goal through a maze. |
| Permutations | Generate all orderings of a set by fixing an element and recursing on the rest. |
| Combination Sum | Find all combinations of numbers that add up to a target, reusing numbers where allowed. |
| Word Search | Find a word in a grid by moving to adjacent cells without reusing a cell. |
| Knight's Tour | Move a knight so it visits every square of a chessboard exactly once. |
| Palindrome Partitioning | Split a string into parts so every part is a palindrome. |
| Generate Parentheses | Produce all well-formed strings of n pairs of parentheses. |
The shape of this dataset, read from the data itself: every column, its type and a real value. Agents can use this to plan a query without fetching the whole document.
| Section | Field | Type | Example |
|---|---|---|---|
| data | problem | string | N-Queens |
| data | description | string | Place N non-attacking queens on an NxN chessboa… |
The static files contain the same reference rows as the API, with no API rate limit. Live metadata, such as view counts, may differ. Use the API for content negotiation; use the static files for a cacheable snapshot.
curl "https://yjtoon.com/api/dataset/backtracking-algorithms?format=toon"
const res = await fetch( "https://yjtoon.com/static-data/dataset/backtracking-algorithms.toon" ); const toon = await res.text();
Rate limit: 120 requests per minute per IP, no key and no signup. API reference →