Interesting! I went from start to end, basically making a greedy algo that way. I kind of like this solution better. I'm gonna convert it into ruby for anyone that finds this later in that language.
I don't know if we are expected to start the loop from the first index, I know that in that task about reaching the bottom right of the matrix, we could start at the end if we get the right solution. I will transform this to loop from 0, just in case
this is actually also similar to DP bottom up approach
Awesome solution man! Loved it
I don't think I would've come up with the greedy approach in an interview setting D:
can i not start at the second last index instead of the last one? the goal is already the last one.
Thanks
@emilyplanes7082