Backtracking
Backtracking searches a space of candidate solutions by building them one choice at a time, and
Backtracking searches a space of candidate solutions by building them one choice at a time, and
Modern CMake Philosophy
Divide and conquer breaks a problem into independent subproblems of the same kind, solves those
Dynamic programming applies when a problem has overlapping subproblems — the same sub-computation
A singly-linked list, or anything shaped like one — a permutation's i -> p[i] mapping, a
A greedy algorithm makes the choice that looks best right now and never reconsiders it. When that
A calendar full of meetings, a set of (start, end) ranges to merge, a question like "how many
"For each element, find the nearest element to the right that is bigger" looks like it needs a nested
Almost every GPU kernel, however specialized, is built from a small set of recurring data-access shapes. Recognizing which pattern a problem is — before writing any code — tells you how parallelizable it is, what its likely performance limiter will be, and often points directly at a library implementation that already exists and is already tuned. This page names those shapes once, and every later applied-kernel page in this knowledge base assumes you already know these names — "this is a reduction" or "this needs a scan" is meant to carry full meaning by the time you reach folder 13.
The pattern controls the line around your message — timestamp, level, logger name, thread id — and
Summing a range of an array costs time proportional to the range. Do it once and nobody notices; do it
The named algorithms in the earlier sections are instances of a smaller number of recurring
This page is a reference, not a tutorial — see Problem-Solving Patterns Overview for a
Dynamic Programming names the idea — overlapping subproblems plus
Test Doubles Taxonomy
"Find the k largest" looks like a sorting problem, and sorting solves it — but sorting also computes
Both patterns replace a nested loop with a single pass by maintaining two indices that only ever move