Gentle Student,

On these pages you will find programming problems that require
both understanding of fundamentals of any procedural programming
language and ability to concoct simple algorithms. If you are
to become a master programmer, you must solve similar
problems on your way to that mastery. If you cannot solve them,
think about what may be missing from your algorithmic set of tools
-- it **will** prove useful later.

The problems are divided into several "chapters", each chapter a mix of hard and easy problems. In each section the problems are arranged so that the harder (and thus more useful) problems come first, while the last problem is usually the easiest one to solve. Sometimes easier problems contain a clue to a harder problem from a different chapter. All chapters are roughly equivalent in difficulty, so you need not finish one chapter to start on a problem from another.

Some harder problems require that you have some idea of
** backtracking**,
an essential algorithmic technique. You can read about it in many standard
textbooks (e.g. applied to find the solutions to the famous "8 Queens"
problem of placing 8 queens on a chess board so that none attacks another).

If a problem doesn't yield to your efforts, try another one. Test
your code to see if it works. **Good luck!**

The problems are in part adopted from

A.L.Brudno, L.I. Kaplan,

by