You are given an array of non-negative integers arr and a start index. When you are at an index i, you can move left or right by arr[i]. Your task is to figure out if you can reach the value 0.
Example 1
Inputarr = [3, 4, 2, 3, 0, 3, 1, 2, 1], start = 7
Outputtrue
Explanation
left -> left -> right
Example 2
Inputarr = [3, 2, 1, 3, 0, 3, 1, 2, 1], start = 2
Outputfalse