1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Checking if BST

Discussion in 'C' started by kens, Jul 17, 2007.

  1. kens

    kens New Member

    Joined:
    Jul 17, 2007
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    0
    WAP to check if a given tree is a BST.
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,287
    Likes Received:
    364
    Trophy Points:
    83
    If
    • The left subtree of a node contains only values less than the node's value.
    • The right subtree of a node contains only values greater than or equal to the node's value.
     

Share This Page