I am confused by pointer, pointer to pointer. I do not understand code below (why binTreeNode ** root?)
Could you pls give me your most personal & favotite view on pointer, pointer to pointer? Thanks. Pls based on code below. However, comparable & similar codes, if applicable, using pointer, pointer to do great job is appreciated. Many thanks.
Have a nice day!
Inserting a New Node in the Tree
void insert(int newKey, binTreeNode ** root)
// Pre: root points to the root of the tree or NULL
// Post: insert a new node in the subtree of lesser height
int leftHeight, rightHeight;
if (*root == NULL)
*root = createNode(newKey, NULL, NULL);
leftHeight = height((*root)->leftChild);
rightHeight = height((*root)->rightChild);
if (leftHeight < rightHeight)