Trees: Is This a Binary Search Tree?

  • + 1 comment

    I know you have probably forgotten about this problem, but I had the same question and found an answer, so hopefully this helps somebody else who comes along:

    The tree in question is:

    ----3

    -2-----6

    1-4---5-7

    in a BST, all nodes and subnodes on the left must be less than the current node, and all nodes and subnodes to the right must be greater than the current node. The reson its not a BST is that 4 is to the left of 3