[algogeeks] Facebook Interview Question

2012-07-30 Thread Mahendra Sengar
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

[algogeeks] Please explain

2012-06-14 Thread Mahendra Sengar
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

[algogeeks] Simple Question ,Find Error

2012-06-03 Thread mahendra sengar
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

[algogeeks] Linked list using void pointer

2012-05-30 Thread mahendra sengar
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