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.
Lowered the range of the input values to result in the MAX_SAFE_INTEGER range.
The issue is the description should've mentioned about the order.
They are, both, numbered. Seems to be a non-issue.
There is no practical reason one way or the other; it's completely arbitary. The corresponding Haskell function
(.)
is also right-to-left, while the lesser-known alternative(>>>)
is left-to-right.A left-to-right interface seems quite odd and has no benefit over a right-to-left interface .. :P
description updated
Thanks!
Fixed
satisfying this definitely increases the difficulty.
Resolved :)
yes
I don't believe you understood. In short combine all groups and return the name with the highest total age.
Your solution is correct.
But as you noticed, the tests are poor. They are checking for equality which is pretty much bound to fail for floating point values when order of operations is different.
The author's solution traverses the diagonal in the opposite direction as compared to yours.
As a result, your solution and the expected answer are slightly different.
Unfortunately, Katas which have already received more than 500 submissions can only have their test cases edited by the admin.
I would recommend you simply traverse the matrix in the opposite direction instead.
Actually, looks like I'm not using a Sieve of Eratosthenes, but trial division with a prime sieve. I must have gotten confused way back when I first wrote this (I've been using this particular algorithm for primes on Codewars for... probably over a year now.)
This is apparently common. Next time I use it, I'll have to remember to change the comment.