There are K pegs. Each peg can hold discs in decreasing order of radius
when looked from bottom to top of the peg. There are N discs which have
radius 1 to N; Given the initial configuration of the pegs and the final
configuration of the pegs, output the moves required to transform from the
main()
{
static i=3;
printf(%d,i--);
return i0 ? main():0;
}
the above code gives output 321
Please Explain how?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
main()
{
static char names[5][20]={pascal,ada,cobol,fortran,perl};
int i;
char *t;
t=names[3];
names[3]=names[4];
names[4]=t;
for (i=0;i=4;i++)
printf(%s,names[i]);
}
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send
how to implement generioc linked list..using void pointer...i havent
used void pointer much so, m not able to use it properly in linked
list..please help asap !!!
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send