Binary search tree is a tree structure defined by the following rules: (1) for each parent node in the tree , the left child node value will be less…