This is the code for a basic binary tree (or binary search tree) which will maintain a list of integers as the payload. Note that it will not self-balance or otherwise adjust itself to account for the data being inserted. To use the following class, you'll have to create an instance. For instance (assuming BT is a class variable to TBTreeNode) : procedure TForm1.Button1Click(Sender: TObject); var i:integer; begin randomize; for i:=1 to 20 do if bt=nil then bt:=TBtreeNode.Create(random(100)) else bt.Insert(random(100)); end; where the class is:
| Graph IRI | Count |
|---|---|
| http://dbkwik.webdatacommons.org | 6 |