Implement a robust Binary Search Tree (BST) data structure in C++:
int value, BSTNode* left, BSTNode* right.void insert(int val): Inserts a value maintaining BST property.bool search(int val) const: Searches for a key in $O(\log N)$ average time.void deleteNode(int val): Removes a node handling all 3 structural cases:void inorderTraversal() const: Prints sorted values.void levelOrderTraversal() const: Breadth-first traversal using std::queue.int findLCA(int n1, int n2) const: Finds the Lowest Common Ancestor of two nodes.bool isBalanced() const: Checks if height difference between left and right subtrees of every node is at most 1.50, 30, 70, 20, 40, 60, 80.(20, 40) (should be 30) and (20, 80) (should be 50).30 (2 children) and verify tree integrity.In-order Traversal: 20 30 40 50 60 70 80 Level-order Traversal: 50 | 30 70 | 20 40 60 80 Is Tree Height-Balanced? YES LCA(20, 40) = 30 LCA(20, 80) = 50 [*] Deleting node 30 (2 children case)... In-order Traversal After Deletion: 20 40 50 60 70 80 [✓] Binary Search Tree operations verified (Time: 0.008s, Memory: 2.2 MB)