Merging binary search trees

This is a discussion on Merging binary search trees within the C Programming forums, part of the General Programming Boards category; Hi all, Can anyone please tell me how i can merge two binary search trees in C language. I am ...

  1. #1
    Registered User
    Join Date
    Apr 2004
    Posts
    1

    Merging binary search trees

    Hi all,
    Can anyone please tell me how i can merge two binary search trees in C language.
    I am new to C programming so complete source code or links to them would be very helpful.

    Thanks in advance,
    Regards,
    IBDutta

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,505
    If you had actually done any of the work yourself on other binary tree primitives (like insert, search), the solution would be bloody obvious.

    But no, you instead "learn" by sponging code off everyone else with the obvious predictable result that you actually know sod-all about programming.

    When you feel like actually trying this for yourself and want to post some of your own code here for help and advice, then we would be happy to help.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >the solution would be bloody obvious
    A solution would be obvious, but anything remotely efficient in terms of time or space would take some thought. I agree with you in principle Salem, but I think your post was a little harsh for a first offense.
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Binary Search Trees
    By lorannex in forum C Programming
    Replies: 3
    Last Post: 04-25-2009, 06:24 AM
  2. Performance issue!
    By maven in forum C Programming
    Replies: 42
    Last Post: 03-23-2009, 11:57 AM
  3. Ornery binary search algorithm
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 11-17-2001, 02:32 PM
  4. Newbie questions regarding binary search trees
    By Ham in forum C++ Programming
    Replies: 1
    Last Post: 11-04-2001, 06:48 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21