Reading the question, this is not an array navigation problem it is a flow control problem. My first solution would be to use recursion (which is a concept many new CS students struggle with) to walk the path. The course's "suggested solution" instead uses a while loop, which is maybe a simpler concept, but also easy to mess up and less elegant in my opinion. Who among us has not ended up with an infinite loop the first time we test a piece of code using either concept, much less when we are limited to pencil and paper rather than an IDE that calls out our mistakes for us?