Thread: Merging binary search trees

  1. #1
    Registered User
    Join Date
    Apr 2004

    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,

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    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.

  3. #3
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    >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, 03:32 PM
  4. Newbie questions regarding binary search trees
    By Ham in forum C++ Programming
    Replies: 1
    Last Post: 11-04-2001, 07:48 AM