A complete binary tree is defined as a binary tree in which every level, except possibly the deepest, is completely filled. At deepest level, all nodes must be as far left a
bool isComplete (struct Node* root){
if(root==NULL)
return true; // Recur for left and right subtree
bool flag=false;
int option1=height(root->left);
int option2=height(root->right);
if(option1==option2||option1==option2+1)
flag=true;
return flag&&isComplete(root->left)&&isComplete(root->right);
}
please consider as a correct answer if you found useful.