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.
Do you primarily use C++?
It's a very good solution.
The kata states input will be a non-negative integer. In cases like these I assume the validation/input scrubbing has happened before attempting to call the function.
A few years late on the reply, and maybe the overview has changed since, but it states the input will be a non-negative integer
bruh
yes, when there's only one statement to execute
I'd definitely want to have some input validation and filtering in place before hitting the eval. Despite what others say about the evils of eval, it's perfectly legitimate to use if, and only if, you know fully what you'll be feeding into it and that it won't crash your code, so filtering to test for NaN inputs, and/or wrapping in a try/catch block should be the case here.
Is this really the best practice? I mean should I not put the numerator as a seperate variable? Granted I have done the same thing, but is it really best practice?
This comment is hidden because it contains spoiler information about the solution
You shouldn't use if else, you can do it with array
thanks for telling me :)
We knew, your a genius...
This comment is hidden because it contains spoiler information about the solution
i also came across this thought and totally guessing, i think it is checking for empty string, since if it is that way it is going to be false
i didn't uderstand the second part of the OR, like, if you transform the two strings to lowerCase they will always be equal, right?
Loading more items...