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.
A result like this is not possible as there are only three values involved. So the result would always be something like .0, .33333 or .66666. The next full point will never be reached, so there is no need to use a double.
I added yourPoints to my answer, people just upvote the answers with the least lines so youre not likely to see top answers do it correctly
I am wondering the same, I don't see the yourPoints added in any of the top answers? It should be added, no?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Hi @steffan153, I'm a beginner in java and I've never seen "<<", could you explain ? The mentioned doc didn't enlighten me a lot... Thanks :)
this is not necessary: n >= 5 &&
Why is there 7?
You cannot round 1000/36 to 27.7778, because it's not accurate.
Functional programming is a huge topic. The syntax demands some time to get used to it and it's ok to be confused.
In short this code converts ArrayList to a special object Stream. Stream has a lot of different methods, one of them is reduce(), used here. This method accepts functional interface called BinaryOperator.
What we actually trying to do here is to "declare" something we want to do, leaving Java do all the magic under the hood, rather than implementing it by ourselves.
what if you take a number which digits' sum is not divisible by 9? E.g. 5631?
readable :)
too clever :D
This comment is hidden because it contains spoiler information about the solution
i didnt really get it :(
Loading more items...