* circular linked list
@ 2004-03-27 14:42 MuthuKumar
2004-03-27 20:12 ` Jad Saklawi
0 siblings, 1 reply; 4+ messages in thread
From: MuthuKumar @ 2004-03-27 14:42 UTC (permalink / raw)
To: linux-c-programming
Hai All,
what is the key concept of circular linked list.
My known method is we can do using head value of 1 (first data)
1 - > 2 -> 3 -> 4 ->1 (4 is the last data at this chain)
Is it correct to do the circular linked list.
how we have to delete some value in the list.
If i want to delete 3 means what steps we have to do.
Is there a way to simulate the list with out having the assignment
of head.
Regards,
Muthukumar.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: circular linked list
2004-03-27 14:42 circular linked list MuthuKumar
@ 2004-03-27 20:12 ` Jad Saklawi
2004-03-29 6:24 ` Muthukumar
0 siblings, 1 reply; 4+ messages in thread
From: Jad Saklawi @ 2004-03-27 20:12 UTC (permalink / raw)
To: MuthuKumar; +Cc: linux-c-programming
MuthuKumar wrote:
>Hai All,
>
> what is the key concept of circular linked list.
>
> My known method is we can do using head value of 1 (first data)
> 1 - > 2 -> 3 -> 4 ->1 (4 is the last data at this chain)
> Is it correct to do the circular linked list.
> how we have to delete some value in the list.
> If i want to delete 3 means what steps we have to do.
>
> Is there a way to simulate the list with out having the assignment
>of head.
>
>
Yes, this is done by passing a pointer to the start pointer. An
implementation can be found here :
http://annex.sagehall.com/~abukhzam/cp2/CPII.html
Greets,
Jad
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: circular linked list
2004-03-27 20:12 ` Jad Saklawi
@ 2004-03-29 6:24 ` Muthukumar
2004-03-29 12:11 ` John T. Williams
0 siblings, 1 reply; 4+ messages in thread
From: Muthukumar @ 2004-03-29 6:24 UTC (permalink / raw)
To: Jad Saklawi; +Cc: linux-c-programming
> > what is the key concept of circular linked list.
> >
> > My known method is we can do using head value of 1 (first data)
> > 1 - > 2 -> 3 -> 4 ->1 (4 is the last data at this chain)
> > Is it correct to do the circular linked list.
> > how we have to delete some value in the list.
> > If i want to delete 3 means what steps we have to do.
> >
> > Is there a way to simulate the list with out having the assignment
> >of head.
> >
> >
> Yes, this is done by passing a pointer to the start pointer. An
> implementation can be found here :
> http://annex.sagehall.com/~abukhzam/cp2/CPII.html
>
Hai Jad.
Thanks for the guideline.
Is there a way to implement a circular linked list without the HEAD assignment.
First of all ,is it possible ,If else what is the problem with that.
Regards,
Muthukumar.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: circular linked list
2004-03-29 6:24 ` Muthukumar
@ 2004-03-29 12:11 ` John T. Williams
0 siblings, 0 replies; 4+ messages in thread
From: John T. Williams @ 2004-03-29 12:11 UTC (permalink / raw)
To: Muthukumar; +Cc: linux-c-programming
Fundamental Rule of LinkList Traversal: You have to start somewhere.
The major function of a head node, is to point at that starting place.
doesn't mater if its a single link list; double link list; circular link
list; in order to traverse it, you have to get to a node. I cannot
think of a better way of doing that then having an established pointer
to a known node. It also gives many many useful functions in a circular
linked list; for instance if you want to make 1 pass, you start at the
head node and then go head->next until current node is head otherwise,
you might just circle without a clear termination point/ end case.
On Mon, 2004-03-29 at 01:24, Muthukumar wrote:
>
> > > what is the key concept of circular linked list.
> > >
> > > My known method is we can do using head value of 1 (first data)
> > > 1 - > 2 -> 3 -> 4 ->1 (4 is the last data at this chain)
> > > Is it correct to do the circular linked list.
> > > how we have to delete some value in the list.
> > > If i want to delete 3 means what steps we have to do.
> > >
> > > Is there a way to simulate the list with out having the assignment
> > >of head.
> > >
> > >
> > Yes, this is done by passing a pointer to the start pointer. An
> > implementation can be found here :
> > http://annex.sagehall.com/~abukhzam/cp2/CPII.html
> >
> Hai Jad.
>
> Thanks for the guideline.
>
> Is there a way to implement a circular linked list without the HEAD assignment.
> First of all ,is it possible ,If else what is the problem with that.
>
> Regards,
> Muthukumar.
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-03-29 12:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-27 14:42 circular linked list MuthuKumar
2004-03-27 20:12 ` Jad Saklawi
2004-03-29 6:24 ` Muthukumar
2004-03-29 12:11 ` John T. Williams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).