Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
I've formed a link list to contain data,the structure is
public String data;
public NODE pre,next,sub;
It is like a link that each node has three points
a link is like:
I've formed a link like that by programming, but now I don't know how to output the data in order like the numbers above. Really confused by how to form the cycle. Hope anyone whos interested in this or had experience in this type of link structure can give me a hand.