Results 1 to 2 of 2
  1. #1
    6thDAY is offline Member
    Join Date
    Aug 2010
    Posts
    8
    Rep Power
    0

    Default Can 2-3 Trees contain duplicate values?

    Hello, I wanted to know if a duplicate key can be inserted into a 2-3 Tree. My Data Structures book does not mention anything about duplicate keys.

    If so, how is it handled? In terms of insertion.

    Can there also be duplicate keys in 2-3-4 Trees or B-Trees?

    Thanks

  2. #2
    doWhile is online now Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    7

    Default

    Yes, but it depends how you define the values, nodes, and what you are trying to accomplish. For instance one may want unique values for a certain purpose. One way in which duplicates can be achieved by having a Node of a particular value can contain another data structure - such as a list - which contains the 'duplicates'
    Last edited by doWhile; 05-14-2011 at 03:49 AM.

Similar Threads

  1. Splay Trees
    By Growler in forum New To Java
    Replies: 0
    Last Post: 11-02-2010, 02:10 PM
  2. Discard duplicate or repeating values in the xml.
    By reach2sudhakar in forum XML
    Replies: 10
    Last Post: 09-23-2010, 12:59 PM
  3. How to detect duplicate values in an Array?
    By maz09 in forum New To Java
    Replies: 1
    Last Post: 04-08-2010, 07:58 AM
  4. Replies: 1
    Last Post: 03-08-2010, 01:34 PM
  5. How to make a hashmap to allow duplicate values?
    By Preethi in forum New To Java
    Replies: 0
    Last Post: 02-08-2008, 12:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •