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 agree with Marcel completely. Math IS NOT coding. Yes you can use your advanced math knowledge for some kind of shortcuts or speeding up the algorithm, but they are separate skills. I know plenty great mathematicians who are terrible programmers. Probably it is the same vice-versa.
Also, in the text of the task it clearly says "recursive", so I accepted it as a practice in that depratment.
I guess the person taking this personally is you, Briann, since I gave proper explaination, where I personally do not think this is a best practice solution, while saying the solution is totally valid.
Don't be such a child and admit that there's different opinions. I do that as well.
Stop taking things so personally. Admit that the guy could do what you couldn't. And this solution isn't just math; the solution requires you to combine your coding skills with mathematical logic. Otherwise, in only "real life", we don't need to divide by nine and find the remainder; we can simply add all the numbers.
I agree with marcelbrode 100%
"Is" implies equality, which is obviously not the case.
Things like dependency injection have nothing to do with math, as a simple example.
If you wanna learn math, search for math problems. Knowing how to use a calculator does not improve your coding knowledge.
While this solution is of course very valid, it misses the purpose of codewars
Coding IS math.
Then answer me this question:
Is this page there to improve your coding or your math?
What? Using math knowedge is the best way of solving a problem. This solution is many times simpler and more effecient than any iteration based method.
Would name the variables better, since "Best Practice" should have readable code, but the solution should be the way to go :D
I'm surprised that this is considered a "best practice" so often. This solution requires math background knowledge. This isn't "solving" the problem, it just implements a solution.