zorrotech2010
Right off the assembly line
hey can someone tell me how to find a loop in a linked list....ive searched a lot on google.i found the famous floyed`s algorithm but what i dont understand is that how can this algorithm if the length of the loop is bigger than 4 node...as in what if a have a linked list that goes on like
a->b->c->d->e->f->g->h->i->j->k->l->m->b.....
could someone please suggest an algorithm for this or if floyd s works for this then how?
a->b->c->d->e->f->g->h->i->j->k->l->m->b.....
could someone please suggest an algorithm for this or if floyd s works for this then how?