From: Phlip Date: 2009-05-19T01:35:03+09:00 Subject: Re: permute each element of a ragged array? Colin Bartlett wrote: > Given the clarification, I think there is a pattern: > the element of the first set is varying slowest in the examples, > with the empty set being returned last, > but I assume that that is not absolutely necessary? That's why the assertions guessed that the results would come back rotating in that order: > * one recursive solution (MT) which varies the element of the first set slowest > (returns array of strings rather than array of arrays, but easily modified?); > MT recursive > "android insaneclown" > "android" > "insaneclown" > "" The two written solutions were the same pattern, so I went with them. The quiz question what's the _shortest_ oneliner here remains open, but I'm aware Ruby is not automatically the world's greatest array manipulation language. Thanks, y'all! -- Phlip