01 // PROJECT AT A GLANCE
C POOL — DAY 05
CSolving a problem by making it call itself — all the way to the eight queens problem.
Recursion is a way of thinking as much as a technique: instead of describing how to repeat an operation, you describe the problem in terms of a smaller version of itself. The day ends on a computing classic, placing N queens on a chessboard without any of them being able to take another.
Iterative and recursive versions of factorial and power, integer square root, primality test, and counting valid N-queens placements by backtracking.
PRIMARYC
DELIVERYTEAM RECORD
VERIFICATIONgcc/g++
SOURCEINSPECTOR READY
03 // KEY OUTCOMES
- N-queens problem solved by backtracking
- A direct iterative / recursive comparison on the same functions, factorial and power
- An imposed response budget — under 2 seconds — that rules out naive brute force
04 // SOURCE TREE
READING SOURCE…