#include using namespace std;  struct Node {    struct Node* left;    struct Node* right;    int data;};  Node* newNode(int key){    Node* temp = new Node;    temp->data = key;    temp->left = temp->right = NULL;    return temp;}  int finddepth(Node* root){        if (!root)        return 0;          int left = finddepth(root->left);          int right = finddepth(root->right);          return 1 + max(left, right);}  Node* dfs(Node* root, int curr,          int depth){        if (!root)        return NULL;          if (curr == depth)        return root;          Node* left = dfs(root->left,                     curr + 1, depth);          Node* […]

Continue Reading