So I know there are folks much smarter than me on this mailing list, so hopefully one of you will be able to answer this question:
I'm working on this problem for a job application that involves creating a "word rectangle" of maximum size with a given dictionary. I think I have a reasonable algorithm for the main search component.
What I can't figure out is a smart way to generate a list of array sizes (given some maximum word length of x) in descending order of area. For the prototype I wrote in Perl, I just enumerated all of the possible unique pairs, put them in a list, and sorted by their product.
This seems... inelegant. Stupid, even. Can any of you think of a less "just hit it with a rock" sort of solution for this?