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,375
    Likes Received:
    388
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice