Singly link list

S

Shwetabh

Hi,
can some one tell me:

-> how to remove a loop from a singly linked list with a loop.
-> how to count the number of nodes in a looped singly link list.

Thanks
 
M

Michael Mair

Shwetabh said:
Hi,
can some one tell me:

-> how to remove a loop from a singly linked list with a loop.
-> how to count the number of nodes in a looped singly link list.

comp.programming might be a good starting point for such an
inquiry.
If you have implemented the solutions in standard C and have
problems or want a code review, you can come back to comp.lang.c

BTW: groups.google.com can also help you find the answer.

Cheers
Michael
 
L

Lew Pitcher

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
can some one tell me:

-> how to remove a loop from a singly linked list with a loop.
-> how to count the number of nodes in a looped singly link list.

Sorry, but this has nothing to do with C. Perhaps comp.programming can help.

- --

Lew Pitcher, IT Specialist, Enterprise Data Systems
Enterprise Technology Solutions, TD Bank Financial Group

(Opinions expressed here are my own, not my employer's)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)

iD8DBQFC1BiDagVFX4UWr64RAlVvAJ4zLUIYssXsmNVsfLjLK03GqnAcGgCgxrK1
SUv6Ay4NRX1WW+kYtgV3dQY=
=Gmc/
-----END PGP SIGNATURE-----
 
S

Shwetabh

Hi,
I forgot to mention that I want to
implement them in C language. So, I
hope it qualifies for this group.
Thanks
 
S

Shwetabh

Hi,
I forgot to mention that I want to implement it in
C language. So, i hope now it qualifies for comp.lang.c

Thanks
 
W

Walter Roberson

I forgot to mention that I want to
implement them in C language. So, I
hope it qualifies for this group.


Sorry, no. comp.lang.c is not considered an algorithm development
newsgroup. If you have uncertainties about the meaning of some
particular C feature, or whether something is part of standard C or
is an extension, then those are good topics for comp.lang.c .

As the other posters noted, for algorithm development, comp.programming
is more appropriate.


Those have the look of homework questions.

When you take the question over to comp.programming, you should
tell them whether you want to -break- the loop, or to -delete- the
loop. You should also indicate any constraints you might be under,
such as "No available space in the node data structure" or
"Not allowed to malloc" or "The maximum number of nodes in the list is N",
or "Recursion is not allowed" or "Not allowed to use a double-linked
list to check the singly-linked list."
 
C

CBFalconer

Shwetabh said:
Hi,
I forgot to mention that I want to
implement them in C language. So, I
hope it qualifies for this group.
Thanks

Having followed this group for a few weeks, and having observed
what is and is not topical, and having read the FAQ and the welcome
message, you should be able to answer that question for yourself.
Maybe the next time you will have also corrected the obnoxious rude
habit of top-posting.
 
L

Lawrence Kirby

Hi,
I forgot to mention that I want to implement it in
C language. So, i hope now it qualifies for comp.lang.c

Your question is about datastructures and algorithms. At this point the
language isn't a primary issue, you need to find an algorithm to do what
you want, and then you can consider the implementation details for a
particualr language. I suggest you try comp.programming.

Lawrence
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top