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 is just an elegently written brute force method. It is short, but it isn't clever or good practice. O(n^2) is not good for this problem.
res is the time in seconds, this way there is no need to round numbers or anything like that
I was so confused for so long about what this Kata was asking. I thought that you were just supposed to pick the higher of the two available numbers to choose from on each subsequent row, not the path with the largest sum. I realize now how silly that is, but it looks like a lot of other people have had the same confusuion.
You are looking for the path with the highest sum, not the path that picks the highest of the two options for each row.
I like this! You could make it more efficient than any i've seen if you used a logarithmic search method instead of a linear search method. e.g. binary search.