问1道array hop的题# JobHunting - 待字闺中
j*n
1 楼
没想明白,这个是DP还是什么?
Start with an array A of positive numbers. Start at index 0. From index i,
you can move to index i+x for any x <= A[i]. The goal is to find the minimum
number of moves needed to get to the end of the array.
更新,面试时候的题目说这个array 只是非负,会有0的情况,跳那就卡死了。
请指教....
Start with an array A of positive numbers. Start at index 0. From index i,
you can move to index i+x for any x <= A[i]. The goal is to find the minimum
number of moves needed to get to the end of the array.
更新,面试时候的题目说这个array 只是非负,会有0的情况,跳那就卡死了。
请指教....