System and method for balancing binary search trees
AssigneeInternational Business Machines Corporation
InventorDavid Simon Mitchell
Life of this patent
Estimating the term…
Loading patent…
AssigneeInternational Business Machines Corporation
InventorDavid Simon Mitchell
Estimating the term…
An improved binary search tree (BST) balancing facility balances BSTs by copying pointers to the nodes of a BST into a pointer list in accordance with a sequential order of respective data values of the nodes. The balancing facility then builds a balanced BST based on a first index to a first pointer of the pointer list and a second index to a last pointer of the pointer list. In an illustrative embodiment, the balanced BST is built by identifying a central pointer at a midpoint of the pointer list, a left range of pointers before the midpoint, and a right range of pointers after the midpoint. The central pointer is then interpreted as a pointer to a root node, and a balanced left subtree of the root node and a balanced right subtree of the root node are built based on the left range of pointers and the right range of pointers, respectively.
A data processing system with facilities for obtaining a balanced binary search tree to optimize searches, said data processing system comprising:
A program product for obtaining a balanced binary search tree to optimize searches in a data processing system containing a collection of at least three nodes and a respective pointer to each node within said collection, said program product comprising:
A method within a data processing system for obtaining a balanced binary search tree to optimize searches, said method comprising:
Dependencies are inferred from the claim text.