Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 22nd, 2008, 8:23 PM   #1
tmac_619
Newbie
 
Join Date: Feb 2008
Posts: 4
Rep Power: 0 tmac_619 is on a distinguished road
Implementat of B-Tree

I am currently working on a B-Tree implementation.
I am working on the Insert Function. I just have a quick question. When you are suppose to insert something in the tree, you have to run a search. And in order to search you need to compare objects. How are we suppose to compare..? Compare the address, pointer or any other thing ?.

Thanks,
tmac_619 is offline   Reply With Quote
Old Feb 22nd, 2008, 8:51 PM   #2
Narue
Professional Programmer
 
Narue's Avatar
 
Join Date: Sep 2005
Posts: 419
Rep Power: 4 Narue is on a distinguished road
Re: Implementat of B-Tree

Compare whatever it is you're using as a key. The order of the tree is based on that key, so you should know what it is. It could be as simple as the data item itself, or it could be a separate key, or a part of the data item.
__________________
Even if the voices aren't real, they have some pretty good ideas.
Narue is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
can someone please help me with this tree cwl157 Java 19 Oct 27th, 2007 12:35 PM
data tree for A* algorithm cwl157 Java 0 Sep 17th, 2007 3:48 PM
linked list & binary tree questions n00b C++ 14 Nov 4th, 2006 2:24 AM
Having trouble implementing an int AVL Tree xenop Java 2 Oct 2nd, 2006 7:41 PM
BinaryTree , I need help on inserting expression to the Tree Master C# 3 Oct 14th, 2005 3:42 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:57 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC