Ad
  • Custom User Avatar

    All is fixed!
    Except suggestion to check for zeros in random tests, because if we create array with 100 elements, one of them would have zero. I wrote test to prove it, it imitates creation of 1 million arrays with 100 elements and all of them contain zero, please take a look:
    @Test
    void testZeros() throws Exception {
    Random random = new Random();
    for (int i = 0; i < 1_000_000; i++) {
    boolean containsZero = false;
    //imitates creation of array with 100 elements
    for (int j = 0; j < 100; j++) {
    if((random.nextInt(100_000) + "").contains("0")) {
    containsZero = true;
    }
    }
    if(!containsZero) {
    System.out.println("there is no zero in " + i + "array");
    throw new Exception();
    }
    }
    System.out.println("All arrays contains zero");
    }

  • Custom User Avatar
  • Custom User Avatar

    any tips? I have left only this kata left on level 7 in java, need help! I understand that flag encoded in FLAG variable somehow with number 16, I tried to get every 16 letter, I tried to use online auto decoders, please help!

  • Custom User Avatar

    Great kata, thank you!

  • Custom User Avatar

    Thanks, you helped me to understand this task