Results 1 to 8 of 8
  1. #1
    fam2315 is offline Member
    Join Date
    Feb 2011
    Posts
    78
    Rep Power
    0

    Default BTree Implementation

    Can someone point me to an example of a BTree in Java. I particularly need to see how a deletion works so that I can put println statements in and see how the code works.

  2. #2
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,782
    Rep Power
    7

    Default

    Oh no Google is broken again.

  3. #3
    JeffGrigg is offline Member
    Join Date
    Aug 2011
    Posts
    95
    Rep Power
    0

    Default

    Here's a good place to look:
    Let me google that for you

  4. #4
    fam2315 is offline Member
    Join Date
    Feb 2011
    Posts
    78
    Rep Power
    0

    Default

    I couldn't locate an example, so I figured someone in this forum may be aware of one.

  5. #5
    fam2315 is offline Member
    Join Date
    Feb 2011
    Posts
    78
    Rep Power
    0

    Default

    14 posts and you feel the need to play that role...

    I've tried google and I can't seem to find an example of a delete.

  6. #6
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,782
    Rep Power
    7

    Default

    Quote Originally Posted by fam2315 View Post
    I couldn't locate an example.
    What the hell did you use as a search term? "soggy blancmange"

    I tried "java btree" and got plenty of examples.

  7. #7
    JeffGrigg is offline Member
    Join Date
    Aug 2011
    Posts
    95
    Rep Power
    0

    Default

    OK, here's a description of how to delete a node in a binary tree:
    Binary search tree - Wikipedia, the free encyclopedia

    Yes, it is a bit tricky.

  8. #8
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,433
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by JeffGrigg View Post
    OK, here's a description of how to delete a node in a binary tree:
    Binary search tree - Wikipedia, the free encyclopedia

    Yes, it is a bit tricky.
    I don't think that's what the OP means; a binary tree isn't a Btree (as in Btree, B+tree and B*tree). Deleting a node from a BTree can be tricky indeed by not for the reasons outlined in that wiki article. Basically you have to delete the element from a node and when the node becomes too small you borrow an element from the parent and join the node with one of its neighbours; apply recursively to the parent node etc.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. AI implementation
    By vxaviern in forum Advanced Java
    Replies: 2
    Last Post: 11-18-2010, 09:02 AM
  2. Solr Implementation
    By j.venkata.krishna in forum Lucene
    Replies: 0
    Last Post: 07-13-2010, 11:48 AM
  3. error in DES implementation
    By Bharati in forum Networking
    Replies: 2
    Last Post: 03-26-2010, 05:21 PM
  4. Stack implementation
    By jefrazie in forum New To Java
    Replies: 3
    Last Post: 10-07-2009, 12:59 PM
  5. how to use btree to store data
    By fred in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 05:52 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
  •