Problem statement:
Given four words, place them inside a m x n grid of squares such that the area of the grid is as small as possible.
Words must run from left to right and from top to bottom inside the grid. Letters may overlap, but additional words cannot be formed. All words have to be linked to each other in one giant chain.
Example grids that can be formed with the 4 words "one,two,three, and four." Note the last grid is the most optimized.
I'm trying to learn python and I thought this would be a good application to cut my teeth on.
Any ideas how to structure my data and algorithms to solve a problem like this? I'm not looking for a straight out answer, but some tips like:
Use this library, or this class, or this data structure. Or iterate like this through the available space.
ONE TWO THREE FOUR
? – Ordain