Link to home
Start Free TrialLog in
Avatar of raheelasadkhan
raheelasadkhanFlag for Pakistan

asked on

Crossword Algorithm

Hi,

Anyone worked out an algorithm for developing crossword configurations given the following variables:

GridWidth
GridHeight
Empty cells allowed
Word list (The word list can contain any number of words. Even more than can fit on the grid. Each word can have a minimum character length of 1 and a maximum character length of Max(GridWidth, GridHeight))

As a result, the output of the algorithm should generate multiple populated versions of this grid and some words from the list may be left out. The language of the implementation does not matter (could even be psuedo code).

Thanks,

Khan

Listed below is a simple class to explain what I am looking for.
========================================
class Grid
{
      public int Width;
      public int Height;
      public char[,] Cell;

      public Grid (int width, int height)
      {
            this.Width = width;
            this.Height = height;

            this.Cell = new char [this.Width, this.Height];
      }

      public Grid [] Generate (System.Collections.ArrayList <System.String> wordList)
      {
            // Algorithm
      }
}
ASKER CERTIFIED SOLUTION
Avatar of nepostojeci_email
nepostojeci_email

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of raheelasadkhan

ASKER

Any examples in C#?