hello
i came across a really difficult exercise about linked lists..
and i cant seem to solve it

here's the question

there's a doubly linked list which is also circled (i.e the last node's next pointer points to the head of the list,and the head's prev pointer points to the last node).

the data in each node is an integer.

now a jump in a circular list is as follows:
if we have a node p :
if p.data is positive we move p.data times using the next pointer
if p.data is negative we move p.data times using the prev pointer
if p.data is 0 we dont move at all.

now you need to write a method that recieves as a paramater a pointer to the head of the list , and returns true if threre's a path that starts from the head node and ends there.

an example:
2-->14-->-5--> 1-->-4-->1

for this list the method will return true,because we start with 2 ,move to -5,
then move to 1(moving backwords) ,then -4 ,and then 2.

this is not homework(i'm working on different exercises in order to prepare my self to an exam)

help will be appreciated..
thank you very much.