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.
I think this solution is actually smart, good work
writing loops only to realise could've done just simple maths
+rep
Gauss would be proud! What a code.
This comment is hidden because it contains spoiler information about the solution
response to old question on performance:
my understanding is because the divisions are all repetition and the Math.Log is all repetition.
combined altogether, youre doing approximately more loops than what you think jt should be doing.
from cursory googling, the integer.sum method only accepts two numbers as parameters. How does this work with the stream function?
Does this code allow to check if the array is empty or not? E.g., when it contains neither element...
The way you used modulo operator to know the number is integer or not is a nice way to me, now I knew a new thing for today. Thanks :)
nice choose
This solution may produce StringIndexOutOfBoundsException if you put double space beetwen the words
Awsome code for me as Beginner. I like it. i Hope i can remeber the Arrays.stream looks much better then the standart for loop like i have
very clever but hard to read
You have absolutely no idea what you're talking about. This is an equation based on math equations since the discovery of Euler's number in the 1700's. It's probably the easiest way to solve this problem, provided you understand the math and remember the formula. Personally, I solved this w/ a while loop b/c I couldn't remember the formula w/o checking, but your analysis is f-----g absurd.
It's a pleasure to see so clean code! I learn a lot thanks to You. Thanks bro.
Loading more items...