Binary Search

This page contains info on Binary Search Trees.

What is Binary Search?

A Binary Search Tree is an algorithm to sort data, so it can be found easily later.

Steps to search in Binary Search Tree

  1. Start with the root of the tree
  2. Compare with target element
  3. Search left or right half wheather smaller or larger
  4. Repeat steps 2 and 3 until element found or no more elements to search

Example Binary Search Tree

Learn more on wikipedia: Binary Search Tree on Wikipedia