Doubt at 8:44 Line 101

At line 101 root is returned if leftans and rightans both are not NULL. But even when both the leftans->data==a and rightans->data==a, it returns root, whearas they both should be different. So, it would be better if we write

if (leftans->data == a && rightans->data == b) {
return root;
}

if (leftans->data == b && rightans->data == a) {
	return root;
}

hello @girishgargcool please attach your code by saving in ide.codingblocks.com.