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
On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area
What does the error message "DGROUP exceeds 64K" mean?
Explain logical errors? Compare with syntax errors.
Is it possible to initialize a variable at the time it was declared?
A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile
ATM machine and railway reservation class/object diagram
Can the “if” function be used in comparing strings?
A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor
What is getch() function?
I need testPalindrome and removeSpace
#include
What is difference between %d and %i in c?
Explain how can I prevent another program from modifying part of a file that I am modifying?
What are enumerated types?
formula to convert 2500mmh2o into m3/hr
What is the use of pointers in C?