Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
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");
}
"expected 333122 but was 312 ==> expected: <333122> but was: <312>"
. Much better idea would be to use custom assertion message to present input of a failed test.Please approve Java translation https://www.codewars.com/kumite/623e370c1c0bbd000e2bbab1?sel=623e370c1c0bbd000e2bbab1
It's a puzzle, so we can't really give any hint. All I can say is that you should be able to see the flag with your eyes, if you do it right.
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!
You're welcome!
Great kata, thank you!
Thanks, you helped me to understand this task