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.
For meme upvotes
This comment is hidden because it contains spoiler information about the solution
Well it is an infinit loop. The only thing that makes it NOT infinit is that return also acts as break.
Which makes it a potential bug.
This comment is hidden because it contains spoiler information about the solution
It's the original function performed with a recursive implementation instead of loop. It keeps using itself with the n / 10 parameter until one of the first two conditions is met. Pretty neat.
My maths lecturer would be appauled by your comment @Encription0001 :D This code can be refactored to any value of water when you multiply. You should never use proper fractions, e.g. 1/2 (/2) 1/4 (/4) as cases such as .75 would mean 3/4 and you cant use the divide operator without multiplying the numerator thats > 1. e.g. ((1/4)*3) and using integer conversion will always round down a floating point number.
I don't remember. Probably ignoreCase = true;
https://devdocs.io/kotlin~1.8/api/latest/jvm/stdlib/kotlin.text/replace
I mean that wasn't in the specification so not really necessary
Lack of reading comprehension in my case
no, if int can be in different position than 0
yes starting value of range() is 0 so defining it as 0 makes no difference.
.
LMAO!!!
This comment is hidden because it contains spoiler information about the solution
Actually is multiplied by 0.5 liters of water.
Now you can easily change the hard-coded 0.5 to the new amount of water in the variable and the code will be the same.
Using divide by 2 just change the amount of water to 750ml and all code needs to be refactored.
Loading more items...