vkr_coder
BAN USER
Comments (5)
Reputation 0
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
BOOL
IsInterleave(char *S1,char *S2,char *S3)
{
BOOL Ret;
printf("S1 = %s,S2 = %s, S3 = %s\n",S1,S2,S3);
if(*S1 == '\0' && *S2=='\0' && *S3== '\0')
return TRUE;
if(*S1 == *S3)
{
Ret = IsInterleave(++S1,S2,++S3);
if(Ret)
return TRUE;
}
if(*S2 == *S3)
{
Ret = IsInterleave(S1,++S2,++S3);
if(Ret)
return TRUE;
}
return FALSE;
}
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.
without needing to have a separate free list, we can use XOR linked list to fill the pointer field in each node. In this case, we can traverse the same list to get the first free node i.e., a node whose prev pointer will be NULL.
- vkr_coder December 07, 2010