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.
You must cut this log in pieces of length
[3, 6, 26]
(35
) and value[8, 17, 80]
(105
). Hope this helps! ;)From what you said it seems the misunderstanding is that you think you can cut the log only once. Of course you can cut it any time you want, that's what makes the difficulty of this kata (avoiding the
O(n²)
complexity)Sure hope this isn't a stupid question. I'm passing all the sample tests except for the last one that was commented out. It says it should be 105, but I'm getting 104.
Can someone please explain to me why
cutLog(p, 35)
is supposed to return 105 and not 104? Even going through it manually, I can't find any pair that adds up to 105.Here's
p
: