Tiling a Rectangle with the Fewest Squares
Fill the first empty cell with the largest fitting square, backtrack over sizes, and prune any branch that cannot beat the best count.
Fill the first empty cell with the largest fitting square, backtrack over sizes, and prune any branch that cannot beat the best count.