Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in C only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Today's Posts
Member List
Calendar
Home
Forum
Topic
C
Searching in B Tree
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
Man4ish
New Member
Join Date:
Mar 2008
Posts:
151
#1
Searching in B Tree
Mar 21 '09, 09:39 AM
Can we search a value in B Tree which is less than or greater than a given value instead of searching the value. How?
Thanks in advance.
weaknessforcats
Recognized Expert
Expert
Join Date:
Mar 2007
Posts:
9214
#2
Mar 22 '09, 12:18 AM
I assume you have Googled this already and found no help?
Comment
Post
Cancel
Man4ish
New Member
Join Date:
Mar 2008
Posts:
151
#3
Mar 22 '09, 05:36 AM
Originally posted by
weaknessforcats
I assume you have Googled this already and found no help?
Yes I googled it but in the B tree only node that is present can only be searched , but i am trying to retrieve the node which has value less than or greater than a given node.
Comment
Post
Cancel
weaknessforcats
Recognized Expert
Expert
Join Date:
Mar 2007
Posts:
9214
#4
Mar 22 '09, 04:13 PM
Then you have your answer: You can't search a B tree for a less-than value.
To do that, you need a sorted container. B trees are not sorted.
If you are using C++, create a vector and sort it. Then you can search it for your
less than
values.
If you are using C, create an array and sort it.
Comment
Post
Cancel
Man4ish
New Member
Join Date:
Mar 2008
Posts:
151
#5
Mar 23 '09, 05:57 PM
Originally posted by
weaknessforcats
Then you have your answer: You can't search a B tree for a less-than value.
To do that, you need a sorted container. B trees are not sorted.
If you are using C++, create a vector and sort it. Then you can search it for your
less than
values.
If you are using C, create an array and sort it.
Thank you very much for your answer
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment