Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

A question about connecting two circular lists

  1. Mar 18, 2008 #1
    i have two circular linkes and we need to connect them together
    in the place where we found some value in the node
    the implemintation is here:
    i can get the link where the X value
    and the previous to it

    but i also need to close links from the other list
    tare them and connect them together
    i cant see where its been done
    in this code
    Code (Text):

    public void insertBefore (Object x,Link link) {
    Link p= whereIs(x) ; //a given function that return the node that has X
    if (p!=null) {
    Link  q=link;
    while (q.next !=link)
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted