Answer Posted / crispin
/*
* Simple tree node representation
*/
struct node_t {
struct node_t *left;
struct note_t *right;
};
/*
* Return the maximum depth of the tree given a pointer
* to its root node.
*/
unsigned int
tree_depth (node_t *root)
{
return (NULL == root) ? 0 :
MAX(tree_depth(root->left, root->right)+1);
}
Is This Answer Correct ? | 3 Yes | 6 No |
Post New Answer View All Answers
List some of the static data structures in C?
What is volatile variable in c?
What do you mean by recursion in c?
Explain how can I read and write comma-delimited text?
how logic is used
What is wild pointer in c?
What is the difference between array and pointer in c?
my project name is adulteration of chille powder.how can i explain it to the hr when he asks me about the project?
What is string concatenation in c?
What is n in c?
What is the use of the function in c?
Is array name a pointer?
What is oops c?
Is c is a low level language?
Explain a pre-processor and its advantages.