Saturday, May 22, 2010

B-tree of order five for C++?

i need to find some source code examples for B-tree of order five for C++, thank you

B-tree of order five for C++?
I found some good references for B-trees in C++ at the sites below.
Reply:enjoyed this site


http://www.comsc.ucok.edu/~thornton/btre...





Procedure Printtree(p: pointer; level : integer);


var i: integer;


Begin


if p %26lt;%26gt; nil then


begin


for i := 1 to level do


write(' ');


for i := 1 to p^.ct do /*p^.ct is a count of the number of data


elements in the node pointed to by p*/


write( p^.el[i].id);


writeln;


printtree(p^.link0, level+1);


for i := 1 to p^.ct do


printtree(p^.el[i].link, level+1);


End


End;


No comments:

Post a Comment