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.
This comment is hidden because it contains spoiler information about the solution
at first I added test from description:
@Test
public void testFirst() {
int[][] firstPyramid = new int[][]{
{3},
{7,4},
{2,4,6},
{8,5,9,3}
};
assertEquals(23, LongestSlideDown.longestSlideDown(firstPyramid));
}
pls add more various test arrays and detailed description, for better representation of what we are making the solution. Because I've created algoritm more flexible that it means, because after passing the test, saw failure when press "atempt", that was in logs (unfortunatelly can't upload image):
[ 3, 7, 4, 9 ],
[ 75, 64, 82, 87, 82, 75, 73, 28, 83, 32, 91, 78, 58, 73, 93 ],
[ 59, 73, 52, 53, 87, 57, 92, 81, 81, 79, 81, 32, 86, 82, 97, 55, 97, 36, 62, 65, 90, 93, 95, 54, 71, 77, 68, 71, 94, 8, 89, 69, 73, 52, 39, 90, 84, 52, 95, 65, 94, 64, 96, 22, 58, 45, 56, 82, 74, 52, 98, 38, 91, 78, 90, 70, 61, 17, 65, 87, 90, 23, 54, 89, 97, 41, 64, 41, 69, 84, 67, 25, 61, 90, 75, 46, 96, 76, 77, 56, 86, 69, 90, 84, 76, 27, 78, 19, 45, 88, 48, 83, 76, 6, 87, 53, 99, 64, 77, 63 ]
and it is very confusing, because now I understood it that we can have 4 possible entry points of pyramid, and pyramid could be more unusual that it was expected.
I mean expected was [1] [2,3] [4, 5, 6] ...
unusual [1, 2] [3, 4, 5, 6, 7, 8, 9][10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 ...] ...
I mean that formula for next row from the top not always n+1.
Thank you in advance !
P.S. btw good kata !
unfortunately, can't see the image
lua
https://www.codewars.com/kumite/681ced0898d636777f241f79?sel=681ced0898d636777f241f79
Green is the correct path, red is your path:

The description and task are correct.
or its wrong description of the task or its wrong testcase.
currently as it mentioned in the task from the top to bottom, result should be 1064