convert Doubly linked list to BST inplace

Discussion in 'C Programming' started by vinaychitti, Sep 4, 2010.

  1. vinaychitti

    vinaychitti

    Joined:
    Sep 4, 2010
    Messages:
    1
    Likes Received:
    0
    A doubly linked list with ordered nodes(increasing order) is a SKEWED BST. How can we change it into (inplace)balanced BST .

    make a function which returns the middle of the LL
    middle(node *)
    now find the remaining solution at

    cracktheinterview.org/2010/08/doubly-linked-list-to-bst-inplace/
     
    vinaychitti, Sep 4, 2010
    #1
    1. Advertisements

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:
    1,088
    bugbear
    Mar 24, 2006
  2. darth
    Replies:
    0
    Views:
    669
    darth
    Apr 30, 2004
  3. chand
    Replies:
    7
    Views:
    459
    Terry Reedy
    Sep 5, 2005
  4. Daniel
    Replies:
    5
    Views:
    503
  5. dssuresh6

    need for doubly linked list

    dssuresh6, Nov 18, 2004, in forum: C Programming
    Replies:
    4
    Views:
    797
    J. J. Farrell
    Nov 19, 2004
  6. Joe Estock

    Doubly linked list

    Joe Estock, Mar 19, 2006, in forum: C Programming
    Replies:
    6
    Views:
    495
    Barry Schwarz
    Mar 19, 2006
  7. murali@pune

    doubly linked list

    murali@pune, Mar 23, 2006, in forum: C Programming
    Replies:
    2
    Views:
    664
    Ralph A. Moritz
    Mar 23, 2006
  8. Susan.Adkins@gmail.com

    sorting a doubly linked list/node

    Susan.Adkins@gmail.com, May 3, 2006, in forum: C++
    Replies:
    2
    Views:
    1,173
    Ivan Vecerina
    May 3, 2006
Loading...