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.
.
find a faster way to find divisors (maybe googling turns something up)
you can also try finding divisors for some numbers manually, humans are optimizing problem solvers so you might .. optimize it and then do the same thing in your code
No, you still didn't understand me. You have to solve this WITHOUT calulcating factorial. Try running factorial_func(4000) and see how long it takes (spoiler: too long).
I solved it long time ago, so I don't remember how, but I see I never calculated any factorials. This is more of a math problem.
Also, when you post code, use it with proper formatting, otherwise we can't debug it with all indentation errors.
I don't know exactly where it's wrong, but I see that prime list doesn't contain 2, that's one of your problems (looks like incorrect ranges specified), but it's your task to debug it, not mine.
Also, it looks like you're actually calculating the factorial itself. That's way too slow and not gonna work for bigger numbers. There's another way to solve it.
Why divide by 12? Why divide 12 by 2? Where are these calculations coming from?
12 factorial is BIG number, that's why you can keep dividing it by 2 10 times, until it's not possible anymore. I don't think you quite understood this task...
Yes.
If your code returns an empty list, it's because you modified the input list, and it's empty.
No copying! You need a solution that ONLY uses the input list, and creates 0 other lists. See the post above for short explanation.
You must do the sort in place, that means you should reorder the elements of the input list, not delete its elements, only change their order.
The function must sort the input list in place.
When you do "del a[min_pos]" you are deleting the input list: this is why you get empty lists in tests.
Do you know the difference between
True
and"True"
?Please read this: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution#post-discourse (I see you've already been told to do it, but, read the part aboout formatting and marking your post as having spoiler content, please).
About your problem, you need to return a boolean, not a string like you did.
Last bullet point of this paragraph of FAQ describes your problem.
Read this paragraph too.
Not a kata issue.