Binary Search Tree Program in Java
A binary tree is a non-linear data structure. In a binary tree, each node can have a maximum of two children. A binary tree in which its information is sorted in inorder way is a binary search tree (BST), meaning, the value of each node is greater than or equal to every value in its left subtree, and is less than every value in its right subtree. The depth of a node is the number of edges in the path from the root to that node. The height of a node is the number of edges in the longest path from that node to a leaf node. The size of a tree is the count of the total number of nodes in it. A binary tree is of degree 2 because it can have a maximum of two children. A node with no successor is a leaf node. The internal nodes are the ones with at least one successive node. A line connecting a node to its successor is an edge . A sequence of continuous edges make a path . Two nodes with the same parent are siblings . A node with no parent is the root . Every node other than the ro...