Get your own website
Python
C
Java
 
Python result:
C result:
Java result:
Traversing forward:
3 -> 5 -> 13 -> 2 -> ...

Traversing backward:
2 -> 13 -> 5 -> 3 -> ...
Traversing forward:
3 -> 5 -> 13 -> 2 -> ...

Traversing backward:
2 -> 13 -> 5 -> 3 -> ...
Traversing forward:
3 -> 5 -> 13 -> 2 -> ...

Traversing backward:
2 -> 13 -> 5 -> 3 -> ...