# What is Binary Search Tree ?

## What is binary search tree ?

• The Binary search tree is a node-based on the binary tree data structure has the following properties,
• The left-side sub tree of a node contains only nodes with keys lesser than the node’s key.
• The right-side sub tree of a node contains only nodes with keys greater than the node’s key.
• The left-side and right-side subtree each must also be a binary search tree.

Binary Search Tree

## Pre-order traversal

• This traversal technique it may be traversal order is root-left-right.
• Visit the node.
• Call itself to traverse the node's left subtree.
• Call itself to traverse the node's right subtree.

## Post-order traversal

• This traversal technique the traversal order is left-right-root.
• Call itself to traverse the node's left subtree.
• Call itself to traverse the node's right subtree.
• Visit the node.

## In-order traversal

• An in-order traversal of a binary search tree will cause all the nodes to be visited in ascending order, based on their key values. If you want to create a sorted list of the data in a binary tree, this is one way to do it.
• Call itself to traverse the node's left subtree.
• Visit the node.
• Call itself to traverse the node's right subtree

## Algoithm

Binary Tree Traversing