Tag backtracking

Tips For Backtracking

In backtracking algorithms, you make a sequence of decisions. Every recursive call will make one decision, and will take as an input...

Subset Sum

Given a set \(X\) of positive integers, can you find a subset that sums to \(T\)? The general idea is that you have two choices: Either...

Game Trees

Suppose you have a game on an \(n\times n\) board with some rules and players take turns. Assume no randomness in the game. For most...