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 could have just read the posts below yours and their answers instead of creating another false issue.
You're choosing the wrong path.
Read this:
https://www.codewars.com/kata/551f23362ff852e2ab000037/discuss#5918235980a6997f7b000005
Not a kata issue.
Second basic test
[[75],\n [95, 64],\n [17, 47, 82],\n [18, 35, 87, 10],\n [20, 4, 82, 47, 65],\n [19, 1, 23, 75, 3, 34],\n [88, 2, 77, 73, 7, 63, 67],\n [99, 65, 4, 28, 6, 16, 70, 92],\n [41, 41, 26, 56, 83, 40, 80, 70, 33],\n [41, 48, 72, 33, 47, 32, 37, 16, 94, 29],\n [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14],\n [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57],\n [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48],\n [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31],\n [ 4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]]
75+95+47+87+82+75+73+28+83+47+43+73+91+67+98=1064 NOT 1074
https://www.codewars.com/kata/551f23362ff852e2ab000037/discuss#633b43e52069d5b029de0cf8
[ 4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]
75 + 95 + 47 + 87 + 82 + 75 + 73 + 28 + 83 + 47 + 43 + 73 + 91 + 67 + 98 = 1064
Почему не так? Написанно же, что наибольшее должно быть??
No, and it's been asked and answered many times before. Read the posts below before creating an issue next time, please.
The result should be 1064!
This comment is hidden because it contains spoiler information about the solution
CoffeeScript translation
You can't jump from 75 to 77, The only possible paths from 75 lead to 73 and 7.
Now added in latest fork
Approved
python new test framework + random tests are required. updated in this fork
I made it! Thank you for the answer. I had already googled some dynamic programming before I asked. But I gues I had to go through all the fails.
In the end it truly is simpler than it looked.
First I wrote the greedy algorithm solution. Middle pyramid 1064.
Then I went the brute force way and wrote a resursive function to test lesser pyramids and return all possibilities. Middle pyramid 1074. Large pyramid time-out :-/
I like the kata, but I'm seriously stuck. This takes some advanced algorythmic jazz. Could I have a hint?
Loading more items...