Search:

Type: Posts; User: copeg

Search: Search took 0.10 seconds.

  1. Replies
    7
    Views
    2,043

    Re: Singly Circular Linked List Error

    I see nowhere in your original code in which you define the first node pointing to itself. See post #3
  2. Replies
    7
    Views
    2,043

    Re: Singly Circular Linked List Error

    Step through your code and write out on paper what is happening. On first insert you create a node:

    Node {next = null}

    When you loop through upon second insertion, you end up setting current to...
Results 1 to 2 of 2