doubly linked list

Discussion in 'C Programming' started by murali@pune, Mar 23, 2006.

  1. murali@pune

    murali@pune Guest

    Hi,
    I want to insert a node in an sorted doubly linked list of integers in
    ascending order. The list should not have duplicate nodes. I need an
    algorithm (assuming an object oriented language)

    bye
    murali@pune, Mar 23, 2006
    #1
    1. Advertising

  2. murali@pune

    Chris Dollin Guest

    murali@pune wrote:

    > I want to insert a node in an sorted doubly linked list of integers in
    > ascending order. The list should not have duplicate nodes. I need an
    > algorithm (assuming an object oriented language)


    The you've come to the wrong place, twice over, because C isn't an
    object-oriented language, and you've asked an algorithm question,
    not a language question.

    What's more, if you can't work out an answer to this question yourself,
    with what you know about doubly-linked lists (and if you /don't/ know,
    go and find out), asking someone else for solutions isn't going to
    help you.

    Build up some test cases, starting with the easy ones: insert into the
    empty list, the singleton list (three cases), two elements (five or ten
    cases), eliminating duplication and aiming for a general solution.

    --
    Chris "x.f(y) == f(x, y) == (x, y).f" Dollin
    The shortcuts are all full of people using them.
    Chris Dollin, Mar 23, 2006
    #2
    1. Advertising

  3. murali@pune wrote:
    > Hi,
    > I want to insert a node in an sorted doubly linked list of integers in
    > ascending order. The list should not have duplicate nodes. I need an
    > algorithm (assuming an object oriented language)


    so why are you posting to comp.lang.c again?

    --
    Ralph Moritz
    Ralph A. Moritz, Mar 23, 2006
    #3
    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. murali@pune

    doubly linked list

    murali@pune, Mar 23, 2006, in forum: Java
    Replies:
    3
    Views:
    913
    bugbear
    Mar 24, 2006
  2. darth
    Replies:
    0
    Views:
    443
    darth
    Apr 30, 2004
  3. chand
    Replies:
    7
    Views:
    307
    Terry Reedy
    Sep 5, 2005
  4. Daniel
    Replies:
    5
    Views:
    378
  5. dssuresh6

    need for doubly linked list

    dssuresh6, Nov 18, 2004, in forum: C Programming
    Replies:
    4
    Views:
    606
    J. J. Farrell
    Nov 19, 2004
Loading...

Share This Page