1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Binary search tree question.

  1. Jan 22, 2013 #1
    1. The problem statement, all variables and given/known data
    I need to prove that different insertion orders of the same keys always gives us a different binary tree.

    2. Relevant equations
    All obvious BST properties apply:
    The left subtree of a node contains only nodes with keys less than the node's key.
    The right subtree of a node contains only nodes with keys greater than the node's key.
    Both the left and right subtrees must also be binary search trees.
    There must be no duplicate nodes.

    3. The attempt at a solution
    I don't exactly know how to formally prove this besides just showing a bunch of examples.

    I think this is obvious because there aren't any duplicate keys therefore you will always have a unique layout of the tree.
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted