void sumlevel(node *root, int *esum, int *osum, int h)
{
if (root == NULL)
return 0;
else
{
if(h %2 == 0)
*esum = *esum + root->val;
else
*osum = *osum + root->val;
sumlevel(root->left, esum, osum, h+1);
sumlevel(root->right, esum, osum, h+1);
}
}
int diff_of_level(node *root)
{
int esum = 0, osum = 0;
int h;
sumlevel(root, &esum, &osum, 1);
return esum - osum;
}