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.
The order of returned values is not specified.
Re-raising as an issue.
Multiple issues:
snake_case
)I have understood. It has turned out that there was simply "not enough" list of prime numbers.
At increase in the list to 173 (would be possible less) the mistake was gone.
Somebody can explain how to understand a mistake:
[2492, 1988] should equal [2492, 1988, 8253] in ATTEMPT?
"RUN SAMPLE TESTS" passes without mistakes.
4 tests pass in "ATTEMPT".
The fifth gives a mistake:
"[2492, 1988] should equal [2492, 1988, 8253]"
My code for all numbers - 2492, 1988, 8253 - gives identical number of dividers - 12.
And findNumberWithMostDivisors ([2492, 1988]) gives out [2492, 1988],
and findNumberWithMostDivisors([2492, 1988, 8253]) - [2492, 1988, 8253].
What has to be equal to what in
[2492, 1988] should equal [2492, 1988, 8253]
Sorry. As this was my first kata, it was not streamlined.
I thought a list of primes would help,... but fortget about it.
Thanks.
For python you shouldn't have CamelCaseFunctionNames. I didn't need the list of primes and solved it using simple brute force. If you want to force a better approach I think you need test with longer lists of numbers.
I enjoyed it nevertheless.
Hey, you're already iterating over a full array. If you can do all your addition and multiplication in the same loop (inside if) you won't have to run reducers again. It will improve your performance atleast twice. :)
Regroup all the test with same logic.
omg... I need more explanations about the test cases..
dont know that the deal is but this is annoying the hell out of me im gonna leave it and come back later
This is an error on this test.case:
test.assert_equals(findNumberWithMostDivisors([100,150,18,96]), [96])the answer is not [96], it is [96, 150].
But when submitting, it pass.
That's a little weird.. I fixed again.
Thanks
Loading more items...