I am working on a binary search tree.
So here is the structure used to represent node:
typedef struct TreeNode
{
int num;
struct TreeNode *left,*right;
}TREENODE;
To insert a node into a tree, I have the following signatire method
void InsertNode(TREENODE **root,int data);
In the above method, why do we need a double pointer. We can use one pointer!
Do we use double pointer to avoid duplication?
source
share