//many will have confusion in the below pointer declaration
//int *ptr and int* ptr both are same
int maxValue(struct node *root)
{
struct node *current = root;
while (current->right != NULL)
{
current = current->right;
}
return(current->data);
}
//int *ptr and int* ptr both are same
int maxValue(struct node *root)
{
struct node *current = root;
while (current->right != NULL)
{
current = current->right;
}
return(current->data);
}
No comments:
Post a Comment