A binary search tree is a tree where all of the sibling nodes to the left of a parent node have a value less than the value of the parent node and all of the sibling nodes to the right of a parent node have a value greater than or equal to the value of the parent node.

In the diagram above, all of the siblings to the right of the root node have a value greater than the root node (10, 14 and 13 are greater than 8) and all of the siblings to the left have a value…

Keith Williams

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store