#includeIn this example, INode is used to represent the concept of a node in a binary search tree. A BST class is defined, which has a shared pointer to an INode as its root. The class also has an insert method, which takes in data to insert into the tree. This method calls a private insertHelper method, which recursively traverses through the tree to find the appropriate location to insert the new data. In this case, the INode interface is used through the shared_ptr#include struct Node { int data; std::shared_ptr left, right; }; class BST { std::shared_ptr root; void insertHelper(std::shared_ptr node, int data) { if (!node) { node = std::make_shared (Node{data, nullptr, nullptr}); if (!root) root = node; return; } if (data < node->data) { if (!node->left) { node->left = std::make_shared (Node{data, nullptr, nullptr}); } else { insertHelper(node->left, data); } } else if (data > node->data) { if (!node->right) { node->right = std::make_shared (Node{data, nullptr, nullptr}); } else { insertHelper(node->right, data); } } } public: void insert(int data) { insertHelper(root, data); } }; int main() { BST tree; tree.insert(5); tree.insert(3); tree.insert(7); std::cout << "Done!" << std::endl; }