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.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
this is a very cool solution and still very readable in my opinion, didn't think of using it
Whenever possible, use switch is the best practice. Firstly, readability, and secondly, switch works more efficiently than if - else chains, since with if else the performer does not know in advance which condition will suit him, everything is calculated in runtime, but when using switch, the performer almost instantly chooses what came up according to the condition :) Good luck in your studies!
good catch, wish i had done that in my solution
This comment is hidden because it contains spoiler information about the solution
wwow.
This comment is hidden because it contains spoiler information about the solution
Thanks... I got to learn something new.
What is the time complexity for this solution ?
You shoul calculate percent/100 before while. And you might add +1. i.e. percent = percent/100 + 1. Cause x + x*0.1 = x.1.1
good!
This comment is hidden because it contains spoiler information about the solution
Awesome! Nice and clear. It would be good to handle NumberFormatException if the result number will be bigger, than int =)
The main target of additional task here is not to make you use other control flow statement but to make you think if you can solve the task without direct flow control, I suppose.
Loading more items...