Singly link list

Discussion in 'C Programming' started by Shwetabh, Jul 12, 2005.

  1. Shwetabh

    Shwetabh Guest

    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
    Shwetabh, Jul 12, 2005
    #1
    1. Advertising

  2. Shwetabh

    Michael Mair Guest

    Shwetabh wrote:
    > 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
    --
    E-Mail: Mine is an /at/ gmx /dot/ de address.
    Michael Mair, Jul 12, 2005
    #2
    1. Advertising

  3. Shwetabh

    Lew Pitcher Guest

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Shwetabh wrote:
    > 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-----
    Lew Pitcher, Jul 12, 2005
    #3
  4. Shwetabh

    Shwetabh Guest

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

    Shwetabh wrote:
    > 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
    Shwetabh, Jul 12, 2005
    #4
  5. Shwetabh

    Shwetabh Guest

    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

    Lew Pitcher wrote:
    > -----BEGIN PGP SIGNED MESSAGE-----
    > Hash: SHA1
    >
    > Shwetabh wrote:
    > > 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-----
    Shwetabh, Jul 12, 2005
    #5
  6. In article <>,
    Shwetabh <> wrote:

    >Shwetabh wrote:
    >> 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.


    >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.


    >> can some one tell me:
    >> -> how to remove a loop from a singly linked list with a loop.


    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."
    --
    "This was a Golden Age, a time of high adventure, rich living and
    hard dying... but nobody thought so." -- Alfred Bester, TSMD
    Walter Roberson, Jul 12, 2005
    #6
  7. Shwetabh

    CBFalconer Guest

    Shwetabh wrote:
    >
    > Hi,
    > I forgot to mention that I want to
    > implement them in C language. So, I
    > hope it qualifies for this group.
    > Thanks
    >
    > Shwetabh wrote:
    > > 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.


    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.

    --
    "If you want to post a followup via groups.google.com, don't use
    the broken "Reply" link at the bottom of the article. Click on
    "show options" at the top of the article, then click on the
    "Reply" at the bottom of the article headers." - Keith Thompson
    CBFalconer, Jul 12, 2005
    #7
  8. On Tue, 12 Jul 2005 13:40:26 -0700, Shwetabh wrote:

    > 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
    Lawrence Kirby, Jul 13, 2005
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Patrick McCourt

    Stack & Singly Linked List Data Structures

    Patrick McCourt, May 24, 2004, in forum: Java
    Replies:
    2
    Views:
    923
    Kenneth P. Turvey
    May 24, 2004
  2. HS-MOON
    Replies:
    4
    Views:
    607
    Method Man
    Sep 24, 2004
  3. CR

    AlphaSort for singly linked list

    CR, Dec 15, 2003, in forum: C Programming
    Replies:
    1
    Views:
    513
    CBFalconer
    Dec 15, 2003
  4. RAJASEKHAR KONDABALA

    Reverse search in a singly-linked list

    RAJASEKHAR KONDABALA, Dec 24, 2003, in forum: C Programming
    Replies:
    20
    Views:
    5,819
    saadbinsaulat
    Feb 27, 2011
  5. Anando

    pruning a linear singly linked list

    Anando, Apr 23, 2006, in forum: C Programming
    Replies:
    59
    Views:
    1,225
    Richard Bos
    Apr 28, 2006
Loading...

Share This Page