troubleshooting Question

Crossword Algorithm

Avatar of raheelasadkhan
raheelasadkhanFlag for Pakistan asked on
Programming
2 Comments1 Solution1656 ViewsLast Modified:
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
      }
}
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros