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.
It is impossible for
fac
to be non-prime and dividelst
the way this algorithm is designed. Even though 4 may be a factor oflst
, by the timefac = 4
is the case,lst
will already have had all the 2s divided out of it, so lst wont be divisible by 4. The algorithm will short-circuit and iterate onfac
.This comment is hidden because it contains spoiler information about the solution
Is there an answer better than n^2? All the answers I see poster use two FOR blocks.
I think you weren't supposed to sort the array