Ad
  • Custom User Avatar

    .

  • Custom User Avatar

    You're misunderstanding what a rotation is if you say there are 23 of them. Have you read the wikipedia link?

  • Custom User Avatar

    There are 23 rotations of string 'bsjq'. Array ["bsjq", "qbsj", "sjqb", "twZNsslC", "jqbs"], wich contain only 5 elements can't include all 23 rotations. I can't anderstand why this case return true.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Check my code for a more optimized version of your def get_sum

  • Custom User Avatar

    Ah should have looked at the test cases a bit more thoroughly. Thank you

  • Custom User Avatar

    Which is smaller?

    29917 or 201997
    26945 or 209645
    
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Yes of course you need to know the color of the field :D 1 is black and 0 is white.

  • Custom User Avatar

    In the example QRCode, it goes from black -> black -> white..
    Also, dont you need to know the color of the field to determine if it will be a 0 or 1? If field is black and x+y%2 is 0 -> add 0. If not, add 1. z

  • Custom User Avatar

    I took a example QRCode. The field will be always different, you only have to understand the way you go through the field. (Like the red arrow)

  • Custom User Avatar

    Hello, can someone help me understand the question a bit better..

    We start with the first pixel (in the lower right corner, where also the red arrow begins) which is black, but we have to use mask because (20+20)%2 is 0, therefore we don't add 1 to our bit sequence but 0.
    Next field is white. This time we don't use mask because (20+19)%2 isn't 0, so we add a 0 to our bit sequence.
    Next field is black. This time we don't use mask because (19+20)%2 isn't 0, so we add a 1 to our bit sequence.
    

    How do you know if the field is white or black?

  • Custom User Avatar

    The init in all som cases are set to the number 0

    Right, no problem with that. The parameter init is what it is. Nobody said it should be a[0].

  • Loading more items...