• Thanks for your help, it helped me a lot to understand the sequence.

  • Look at the table:

    Step   P1   P2   P3
    --------------------
     0     0    0    0
     1     1    0    0
     2     2    0    0
     3     0    1    0
     4     1    1    0
     5     2    1    0
     6     0    2    0
     7     1    2    0
     8     2    2    0
     9     0    0    1
    10     1    0    1
    11     2    0    1
    12     0    1    1
    13     1    1    1
    14     2    1    1
    15     0    2    1
    16     1    2    1
    17     2    2    1   <- This case here
    
  • Try to follow the steps enough times and you will see that this situation will occur at some point of time.

  • How can people 2 and 3 have their hands up at the same time if person 3 has to wait for person 2 to put their hands down?
    It doesn't make sense, it's not logical at all.

  • The test is ok.

    #3 advances only after person #2 puts their hands down

    That doesn't mean #2 and #3 can't have both their hands raised at the same time. Look how that works with person #1 and #2 in the kata description.

  • The tests in c# seem wrong to me.
    98 must give 2-2-0 and not 2-2-1. If I have understood the instructions correctly, the 3rd person must raise his hands only when the second person lowers his hands. With 2 on the index[2] the third person cannot raise his hand.

  • R translation (author inactive)

  • Approved.

  • yes working on the same

  • As the numbers may get very large my advice is to try find the math behind this instead of looping through it.

  • I am doing it through python.

  • Probably depending on language, but for C and NASM it's from zero to approx 4.3 billion (a 32 bit unsigned value).

  • how long is the value of n in the attempt test cases? My normal test cases pass successfully but while attempting time runs out😕

  • I have more or less stolen the C translation and made a

    NASM Translation

  • Loading more items...