I can not think of an algorithm. We have a list of words, no matter how long. It is necessary to build a field for a crossword puzzle with the participation of these words. This task is in the book "Programming Etudes".
At the moment, my reasoning is:
sort words by number of letters
Represent this field as a two-dimensional char array
put the longest word in the center of the field and start working on it
words should be read strictly left to right and top to bottom
How exactly to insert the words, so that one word could not just intersect with another, but with several?
UPD
I looked at crosswords and realized that the number of vertical and horizontal words is always proportional, plus / minus one or two. So, it is necessary to implement two functions - one for horizontal, the other for vertical. And call them one after another through recursion until all the words are used.
UPD (I apologize for the quality of the image, I drew in the gimp quickly)
It is necessary to introduce such a thing as a red zone, so that there is no "sticking together" of words.
UPD
I found the article http://habrahabr.ru/post/166471/ , reading the source code gave nothing.
UPD
Another clue found. Book: Mozgovoy M.V. "C ++ Master Class 85 non-trivial projects, solutions and tasks." There is a way to implement the construction of a crossword puzzle, only it is based on the fact that we already have a certain grid and a sufficiently large list of words, which will not be used all.
