A tree that satisfies BST properties. But I think this is not a BST?

Today I am making a problem with binary trees, during which I found a BSTree structure that satisfies the property: "Each node has a lower value on its left child and a larger value for its right child." But this is not BST (in my opinion), because the root is less important than one of his great child. Please explain all this to me.

Binary tree:

      7
     /  \
    4    10
   / \
  2   8

Tell me is it a BST or not? Explain.

+5
source share
3 answers

A more correct definition of BST can be found here :

  • node , , node.
  • node , node.
  • , .

, node , , , BST.

+4

, 8 > 7, 8 7.

+4

BST, . node 8. node, node, 4.

0

All Articles