Talk:Ordered words

From Rosetta Code

Lexicographical order

Note: This task should probably be modified to be aware (and tolerant) of lexicographical order. --Michael Mol 22:15, 9 November 2010 (UTC)

I think it's probably not important on that particular dictionary; it's all lower case and well-behaved. –Donal Fellows 22:37, 9 November 2010 (UTC)

longest word length

By "longest word length", do you mean "equal to the length of the longest ordered word"? --Michael Mol 22:16, 9 November 2010 (UTC)

Yes. I find the ordered words, find the maximum length of any ordered word, then find all ordered words of that maximum length. --Paddy3118 13:09, 10 November 2010 (UTC)
For contrast, the Tcl code does it in a single pass. (It happened to be more natural to express it that way.) The result is the same though; the words in the result list are such that they are all of the same length, all ordered words, and there is no other ordered word (in the originating dictionary) such that its length is greater than the length of any result word. (Also, every ordered word of that length in the originating dictionary is present in the result.) I can't be bothered to write that mathematically. :-) –Donal Fellows 16:24, 10 November 2010 (UTC)