madhu
BAN USER
Comments (9)
Reputation 0
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
int isComBinTree(node *root,int ht)
{
if(ht==1)
return 1;
if(root->right==NULL || root->left==NULL)
return 0;
return isComBinTree(root->right,ht-1) && isComBinTree(root->left,ht-1);
}
Where ht is the height of the tree and leaf nodes are assumed to be sub trees with height 1.
- madhu September 03, 2012Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
this is In-place matrix transposition problem, you can google it, its a famous algo.
- madhu September 03, 2012