Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Binary Search Tree

A binary tree is said to be a binary search tree if for every node, the left is smaller than it and the right is bigger than it. 

Example
       10
    9      20
  6  11   13  26

For example, try looking for 13 and 26.
13 is larger than 10, so go to the right.
13 is smaller than 20, so go to the left.

26 is larger than 10, so go to the right.
26 is larger than 20, so go to the right.
   
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #Binary #Search #Tree
ADD COMMENT
Topic
Name
6+2 =