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.
what if the char value is equal to 5 and your code will follow into else condition, I think it is better to use else if instead
No, it will fail with an
ArrayIndexOutOfBoundsException
.adding int to a string directly for a pythonic guy was quite interesting
I solved this the same way except i converted the numberString.charAt(i) to an int before using it in the if statment and used the 5 as an int. I did not think that it would know what to do with the 5 as a char. Clearly I did not need to do that. I guess my question is how does java know?
Hi,
I'd advise you to stop "messing" with the beta process, unless you wanna your account locked.
Thx.
This comment is hidden because it contains spoiler information about the solution
.
Print the input and you should see why they fail.
This comment is hidden because it contains spoiler information about the solution
I tried indices as well, but didn't work anyway
My guess is as good as yours (haven't solved the kata). But I think the sum of those indices is the answer.
Don't open another issue if it is about the same problem.
I asked too :)
tf is 11 ?
where did exactly 11 come from in this part?
arr = [17, 12, 5, 6, 13, 3] where length is 6.
solution says:
this would return 7 due to
(170 + 52 + 134 + 35) / 11 = 7.
what is 11? shouldn't it be (170 + 52 + 134 + 35) / 4?
arr length is 6, primes length is 4, the only match i found is
5 + 4 + 2 + 0 = 11 (indexes)
Loading more items...