2-3 tree

This is a discussion on 2-3 tree within the Tech Board forums, part of the Community Boards category; lets say i have some int values for example 1;2;4;7;8 which one is the best way to determine in what ...

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,671
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  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-10-2003, 11:47 PM
  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, 02:30 PM

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