generating 2D bit array variants with specific algorythm

sohcahtoa82 at sohcahtoa82 at
Sat Nov 8 02:10:43 CET 2014

On Friday, November 7, 2014 1:13:27 PM UTC-8, Gregory Ewing wrote:
> Robert Voigtländer wrote:
> > I need to generate all variants of a 2D array with variable dimension sizes
> > which fit a specific rule. (up to 200*1000)
> Um... you realise there are 200**1000 solutions for the
> 200x1000 case? Are you sure that's really what you want?
> -- 
> Greg

It sounds like it is indeed what he wants, however, this is likely a homework assignment and the idea is that your program COULD produce the answer for that if he wanted, not that he will actually be using the result.

I'd handle it with recursion, myself.  It sounds like a cool idea for a game of Code Golf on Stack Exchange.

More information about the Python-list mailing list