Raminder
your statement "from this you can do the analysis that p would be 3X 2Y ie
XXXYY" is ambiguous. How would you programatically find end of p and start
of Z?
I found one solution, which in my opinion is incorrect. The guy is taking Z
literally as Z not as a string.
for(i=0;i is less than 'n'; i++)
{
if (flag==1)
{
push(stack, a[i]);
}
elseif(a[i]=='Z')
{
flag==0;
}
elseif(flag==0)
{
if(pop(stack)!=a[i])
{
Print "not PZQ found"
break
}
}
if(i==n)
{
Print "confirmed";
}
Best Regards
Ashish Goel
"Think positive and find fuel in failure"
+919985813081
+919966006652
On Fri, Apr 20, 2012 at 1:40 AM, Ramindar Singh <[email protected]> wrote:
> p would be 3X 2Y ie XXXYY
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.