Data Structure--Binary search treesDefinition. A BST is a binary tree in symmetric orderSymmetric order. Each node has a key,Ordered OperationsDefinition. A BST is a binary tree in symmetric orderA binary tree is either:・Empty.・Two disjoint binary trees (left and right).Symmetric order. Each node has a key,and every node’s key is:・Larger than all keys in its left subtree.・Smaller than all keys in its right subtree.Java definition A BST is a reference to a root Node.A Node is comprised of four fields:A key and A vaule.A reference to the left and right subtreespublicclassNode{privateKeyk
...
继续阅读
(31)