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
same
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
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 just realized now that substring exists. smh
creative
I don't remember. Probably ignoreCase = true;
https://devdocs.io/kotlin~1.8/api/latest/jvm/stdlib/kotlin.text/replace
What is
prevMultOfThree
?? never seen it beforeThis comment is hidden because it contains spoiler information about the solution
what is
true
here for?This comment is hidden because it contains spoiler information about the solution
Loading more items...