An algorithm problem

Bo Yang struggleyb at gmail.com
Wed May 31 11:19:15 CEST 2006


I am sorry , and thanks for your friendliness .
I have change my source code for more meaningful variable name and more 
comments follow the instructions
John has writen . I think that is useful for you to look my code .

And this time I put the code in the attachment . Indeed , I write that 
in the Eclipse Pydev , I don't know why
it lose its idention in the mailing list .

Also , I forget an example for the question , and I compensate for it :

Given the integer 2 for instance :
what we exapct from the algorithm is a list of 0 or 1 ,  for this 
instance it is  1 1 0 0 .
We can take it as a ring , and fetch any continuous 2 numbers from it , 
finally get four combinations :
11 , 10 , 00 , 01
and they are 3 , 2 , 0 , 1 .


I hope this time it is clear for all to understand what problem confront 
me .
And again I am sorry for the trouble , thanks for you again !

Best Regard
Bo Yang



More information about the Python-list mailing list