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 can set two values for indexing
like
i = 0
k = 3
so you can index like
strarr[i:k]
Okay thank you I didn't expect that honestly doesn't make much sense to me, but I'll figure it out
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.
My program times out even though I have time complexity of O(n) anyone have any idea, do I need a time complexity of O(logN)?
I looked up how to do this since I haven't taken calc yet in highschool and I still have no idea how to do this...
This comment is hidden because it contains spoiler information about the solution
Yeah nevermind I was iterating through it from left to right not from right to left mb
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/
java
This comment is hidden because it contains spoiler information about the solution
What language are you talking about? Any examples?
Also this showcases a problem where you have to find a more efficient solution than the most obvious one; which is important in quite a lot of cases.
Loading more items...