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.
Resolved
Yeah, output is (23, 23) now. I thought the tests are isolated. Ok, I'll take care about it. Thank you!
It's not a problem in the tests, try calling your function locally like in the tests, that is, one after the other:
And see what you get.
"The problem is, memo isn't reset, it keeps its value"
Is it the solution problem? Then don't understand why.
Or tests problem?
"Have you tried locally calling your function more than once?"
Sure, many times, with the same or different pyramids, but one per try.
"...distinguish between '11' + '10' and '111' + '0'?"
Didn't think about it. Looks reasonable. The test suite is pretty small, probably need to make it bigger
Have you tried locally calling your function more than once? The problem is, memo isn't reset, it keeps its value. Also
point
being a concatenation of x + y, how would you distinguish between '11' + '10' and '111' + '0'?Sure, but read this first: https://docs.codewars.com/training/troubleshooting#post-discourse
share it here?
And what's the code that does that?
Is it possible to get the same result for all the tests? I get 23, which is correct only for sample test #1. It seems like the tasts share it's state, because if I print out the memo dict, then it's the same for all tests. Meanwhile, on my computer I get different results with the same code for different pyramids (e.g 1074 for medium pyramid). Actually, I have another, not optimized solution and it passes all the tests.
This comment is hidden because it contains spoiler information about the solution
Потрясающая ката. Автору огромное спасибо. Тем кто еще не решил задачу, терпения и удачи. Решение намного проще и короче, чем может показаться изначально.
Maybe adding this example to the description:
It literally says "maximum sum of consecutive numbers from the top to the bottom" in the description? At no place the description mentions that it can be reached by picking the larger of two neighbors. The problem is that, for some reason, users do mental mapping between "largest sum" and "larger choice" . If you have an idea how to make users stop doing this, please do tell.
People have been getting confused with this Kata for YEARS and you guys still don't see why is confusing?
Is confusing because it doesn't clarify that the "longest slide" means reaching the biggest possible number overall, which means that when comparing two numbers, is not enough to just pick the biggest one, since it may lead to a lesser number than taking another path, which implies that at some levels the biggest number for THAT level is not the correct result
Loading more items...