Thread: 2-3 tree

  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    65

    2-3 tree

    lets say i have some int values
    for example 1;2;4;7;8
    which one is the best way to determine in what order should i insert the int numbers in the 2-3 tree for having the fewer possible nodes

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    I guess normally, you would have no prior knowledge of the list of numbers to be added, so in effect you add the numbers as they arrive and perform one (or more) rebalancing operations on the constructed tree.
    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
    Registered User
    Join Date
    Nov 2010
    Posts
    65
    Quote Originally Posted by Salem View Post
    I guess normally, you would have no prior knowledge of the list of numbers to be added, so in effect you add the numbers as they arrive and perform one (or more) rebalancing operations on the constructed tree.
    if i know what numbers i want to put in the tree what should i think for succeeding my goal? or i have to randomly try combinations?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Rooted Tree (Family tree)
    By ch4 in forum C Programming
    Replies: 4
    Last Post: 10-14-2008, 04:24 PM
  2. Replies: 2
    Last Post: 08-01-2007, 01:08 PM
  3. display tree data in binary tree format
    By xddxogm3 in forum C++ Programming
    Replies: 4
    Last Post: 12-11-2003, 12:47 AM
  4. Replies: 5
    Last Post: 05-23-2003, 01:11 PM
  5. b-tree (not binary tree) implementation help
    By Unregistered in forum C++ Programming
    Replies: 8
    Last Post: 01-02-2002, 03:30 PM