here is a question
i've made a function that accepts a pointer to a node and finds the level of the node in the tree.Quote:
write a c-function that accepts a pointer to a binary tree & a pointer to a node of the tree and returns the level of the node in the tree.
my problem is that how can i make a function that should accept another pointer to the tree and returns the level.and also i'm not able to understand what does a pointer to a tree means.is it an array of nodes.Code:
int level(struct node *p)
struct node *r;