Solved..........🔥🔥🔥🔥
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: 100%\u2705\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```c []\n/**\n * Definition for a binary tree node.\n * struct TreeNode {\n *     int val;\n *     struct TreeNode *left;\n *     struct TreeNode *right;\n * };\n */\n\ntypedef struct TreeNode NODE;\n\nvoid compute(NODE * curr, int * comp, int * hlist, NODE* p, int height, NODE* sibnode, int level)\n{\n    if (curr == NULL)\n        return;\n    \n    if (p == NULL)\n        comp[curr->val] = -1;\n    else if ((comp[p->val] == height) ||\n                ((sibnode != NULL) &&\n                (hlist[sibnode->val] >= hlist[curr->val])))\n        comp[curr->val] = height;               \n    else\n    {\n        /* (sibling height + parent node level + 1) > computed value of parent \n         * then "v1"" else "comp[parent]""\n         * Parent level = level -1\n         * Hence sh + (level -1) + 1 ==> sh + level */\n        int v1 = ((sibnode == NULL) ? -1 : (hlist[sibnode->val])) + level;\n        comp[curr->val] = comp[p->val] > v1 ? comp[p->val] : v1;\n    }\n\n    compute(curr->left,  comp, hlist, curr, height, curr->right, level + 1);\n    compute(curr->right, comp, hlist, curr, height, curr->left, level + 1);\n}\n\nint traverse(NODE * curr, int * hlist)\n{\n    if (curr == NULL)\n        return -1;\n\n    int h1 = traverse(curr->left, hlist);\n    int h2 = traverse(curr->right, hlist);\n\n    hlist[curr->val] = ((h1 > h2) ? (h1) : (h2)) + 1;\n\n    return hlist[curr->val];\n}\n\n/**\n * Note: The returned array must be malloced, assume caller calls free().\n */\nint* treeQueries(struct TreeNode* root, int* queries, int queriesSize, int* returnSize)\n{\n    * returnSize = 0;\n\n    int * answer = malloc(sizeof(int) * queriesSize);\n    int * hlist  = malloc(sizeof(int) * 100001);\n    int * comp = malloc(sizeof(int) * 100001);\n\n    int h = traverse(root, hlist);\n\n    compute(root, comp, hlist, NULL, h, NULL, 0);\n\n    for (int i = 0; i < queriesSize; i++)\n    {\n        (*returnSize) ++;\n        answer[i] = comp[queries[i]];\n    }\n\n    free(hlist);\n    free(comp);\n\n    return answer;\n}\n```
['Array', 'Tree', 'Depth-First Search', 'Breadth-First Search', 'C', 'Binary Tree']