Re: An algorithm problem



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
.



Relevant Pages

  • Re: My view on this "Is blah an assembler"
    ... Oh, don't bother, f0dder...this discussion you're trying to have with Rene ... that data trigger the CPU to execute various "instructions" it is capable ... information that source code contains - such as identifier names, comments, ...
    (alt.lang.asm)
  • Re: What is faster?
    ... >>> A boolean stands by itself as a condition. ... they might even compile identically. ... that source code to be translated into machine instructions. ...
    (microsoft.public.vb.general.discussion)
  • Re: What do we think of the new Racing Post site?
    ... I found this in the source code: ... Visit Dynamic Drive: http://www.dynamicdrive.com for script and ... This notice must stay intact for use ...
    (uk.sport.horseracing)
  • Re: Read/copy/call a functions machine code?
    ... What I am trying to do is embed encrypted machine code into the source ... read the source code, ... If that uses fixed size instructions then some of the comments here don't ... Most likely you have a C compiler that can link to assembly routines so I ...
    (comp.lang.c)
  • Re: Fragile Fences
    ... if you are going to provide instructions on how to reproduce the ... >scenario you present as proof of an authoritative internal version of the ... >source code, please include the exact build of Eclipse you are using. ...
    (comp.lang.java.programmer)