title: Are duplicate keys allowed in the definition of binary search trees?
body: <p>I'm trying to find the definition of a binary search tree and I keep finding different definitions everywhere. </p>
  
  <p>Some say that for any given subtree the left child key is less than or equal to the root.</p>
  
  <p>Some say that for any given subtree the right child key is greater than or equal to the root.</p>
  
  <p>And my old college data structures book says "every element has a key and no two elements have the same key."</p>
  
  <p>Is there a universal definition of a bst? Particularly in regards to what to do with trees with multiple instances of the same key.</p>
  
  <p>EDIT: Maybe I was unclear, the definitions I'm seeing are</p>
  
  <p>1) left &lt;= root &lt; right</p>
  
  <p>2) left &lt; root &lt;= right</p>
  
  <p>3) left &lt; root &lt; right, such that no duplicate keys exist.</p>