Write a program that accepts input from user to form a binary search tree and check whether the formed tree is balanced or not.
Example 1:
Input: 2 1 3 4 5 -1

Output: Given BST is Balanced : False
Example 2:
Input: 2 1 3 4 -1

Output: Given BST is Balanced : True
C++ Code
Output