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.
OP solved it, closing
It's 4 breaks to get 5, not 4 pieces of 1x5 blocks, and then 4 breaks for each of those, that's 24. Or you could break it into 1x5 and 5 4x5 pieces, and you'll still have 24 breaks: 1 + 4 + 4 + 5 * 3 = 24
I dont agree. No one would try to break a 1x1 out of a 5x5. I hope nearly everyone would either first break 5x5 into 1x5 and 4x5 or directly into 5 times 1x5, which would only be 4 breaks. Therefore the rest would be broken in to each 1x1 with each 4 further breaks. Therefore resulting in 4 times 4 breaks, so 16 breaks total.
You did it wrong on paper.
you can set two values for indexing
like
i = 0
k = 3
so you can index like
strarr[i:k]
First of all, what you think is O(n) might actually not be O(n), depending on your approach.
But generally yes, you need something better than linear.
Please provide a clear example of alleged failed test, it's very probable you are mistaken. Don't raise issues lightly just because you just don't understand something. Without more elements from you this issue will probably be closed without follow-up some day. See there: https://docs.codewars.com/training/troubleshooting/
What language are you talking about? Any examples?
And 1 is not a prime number: https://blogs.scientificamerican.com/roots-of-unity/why-isnt-1-a-prime-number/
Please read the description again: