Solution

ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2014/functional-programming-design-and-analysis-of-algorithms/6/a/solution

Describe routes by array indices, so repeated entry values cannot confuse positions. Two valid routes are
The first uses jump lengths , bounded respectively by , , , . The second uses lengths , bounded by at its departing positions. Both reach the final index without landing at the zero entry at index six.

New to topics? Read the docs here!