![]() |
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, |
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.
|
| All times are GMT -5. The time now is 4:20 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC