I think searching for palindromes with same starting and ending characters and required lengths to construct the rectangle is one tricky way i can think of.
For generic solution, a good data structure i can think of is a table of trees. We need to find the shortest and longest word and then create a table to store words such that ith row has words with i characters and has as much has 26 trees (for words starting from each char a...z) Need to think for an efficient solution to construct such generic rectangle. Navneet On Mon, Jun 20, 2011 at 10:05 PM, chirag ahuja <[email protected]> wrote: > Given a dictionary of millions of words, write a program to find the > largest possible rectangle of letters such that every row forms a word > (reading left to right) and every column forms a word (reading top to > bottom). > Anyone got any ideas? ... > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
