![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Feb 2008
Posts: 4
Rep Power: 0
![]() |
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, |
|
|
|
|
|
#2 |
|
Professional Programmer
![]() Join Date: Sep 2005
Posts: 419
Rep Power: 4
![]() |
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. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
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 |