Re: [algogeeks] J.P.MORGAN

2011-08-19 Thread Balaji S
@anitha. : JP Morgan din visit our campus. :P tat was Morgan Stanley :P :P -- With Regards, Balaji.S -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe f

[algogeeks] TIC TAC TOE

2011-07-28 Thread Balaji S
Given a 3X3 matrix , with 1's 0's and -1's ( 1 is player one 0 is player two -1 is none) how ll you find who is the winner / draw in a tic tac toe game in the most effiecient manner... -- With Regards, Balaji.S -- You received this message because you are subscribed to the Google Groups "

Re: [algogeeks] output

2011-07-21 Thread Balaji S
@kashyap : wow wat a solution.. great :D -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.co

[algogeeks] Microsoft

2011-07-20 Thread Balaji S
Question - you are given a1b3c7d8.. an array like this. This is a compressed array. (Similar to Run Length) You are supposed to expand the given input IN-PLACE. That is, your array is large enough to hold the output. Example - Input - a1b4 - Array Length - 5 Output - a -- With Regards,

[algogeeks] Output

2011-07-18 Thread Balaji S
The following C program segfaults of IA-64, but works fine on IA-32. * int main() { int* p; p = (int*)malloc(sizeof(int)); *p = 10; return 0; } * Why does it happen so? -- With Regards, Balaji.S -- You received this message because you are subscribed to the

Re: [algogeeks] Re: MICROSOFT

2011-07-18 Thread Balaji S
wats the mistake.. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit

[algogeeks] MICROSOFT

2011-07-18 Thread Balaji S
1. Convert a binary tree to binary search tree inplace.. 2. Convert a DLL to a binary search tree that is balanced. 3. Implement a C++ garbage collector efficiently -- With Regards, Balaji.S -- You received this message because you are subscribed to the Google Groups "Algorithm

Re: [algogeeks] Find the error..

2011-06-22 Thread Balaji S
@pritpal : Refer ques 5 at http://www.youthrocker.com/2011/06/interview-questions-amazon-placement.html @shachindra : wats tat :-o -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.co

[algogeeks] Find the error..

2011-06-22 Thread Balaji S
What is the wrong in this program main() { char *p,*q; p=(char *)malloc(25); q=(char*) malloc(25); strcpy(p,"INDIA" ); strcpy(q,"hyd"); strcat(p,q); printf("%s",p); } -- With Regards, Balaji.S -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" gr

Re: [algogeeks] Amazon - Longest palindrome in a string in O(n)

2011-06-21 Thread Balaji S
LCS(string,reverse(string)) ?? but this is not O(n) ryt.. -- With Regards, Balaji.S -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send

[algogeeks] Output please..

2011-06-17 Thread Balaji S
main() { int i=5; printf("%d",fun(fun(fun(fun( fun(i)); } void fun (int i) { if(i%2) return (i+(7*4)-(5/2)+(2*2)); else return (i+(17/5)-(34/15)+(5/2)); } -- With Regards, Balaji.S -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" gr

Re: [algogeeks] Re: find error

2011-06-11 Thread Balaji S
no error ryt?? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit thi

Re: [algogeeks] MS question

2011-06-02 Thread Balaji S
@above : thanks got it :) -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options

Re: [algogeeks] MS question

2011-06-02 Thread Balaji S
how s that output obtained?? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more opti

[algogeeks] MS question

2011-06-02 Thread Balaji S
#include int main() { int a=3, b = 5; printf(&a["Ya!Hello! how is this? %s\n"], &b["junk/super"]); printf(&a["WHAT%c%c%c %c%c %c !\n"], 1["this"], 2["beauty"],0["tool"],0["is"],3["sensitive"],4["CC"]); return 0; } -- With Regards,     Balaji.S -- You receive

Re: [algogeeks] Answer pls...

2011-06-02 Thread Balaji S
why is it so..?? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit t

[algogeeks] Answer pls...

2011-06-02 Thread Balaji S
#include int main() { float f=0.0f; int i; for(i=0;i<10;i++) f = f + 0.1f; if(f == 1.0f) printf("f is 1.0 \n"); else printf("f is NOT 1.0\n"); return 0; } -- You received this message because you

Re: [algogeeks] Re: spoj--two squares problem

2011-05-27 Thread Balaji S
what if c=9.. 9%4=1 ryt? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options,

Re: [algogeeks] spoj--two squares problem

2011-05-26 Thread Balaji S
sqr(sqrt(c)) == c what ll it return if c is 10... -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegro

Re: [algogeeks] spoj--two squares problem

2011-05-25 Thread Balaji S
Fermat's little theroem ??? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more optio

Re: [algogeeks] C++ problem..

2011-05-24 Thread Balaji S
ya.. thanks :) it works. but.. we are initializing m to 0 in everycall ryt.. ? then how does 1,2,3,is initialized?? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubs

Re: [algogeeks] C++ problem..

2011-05-24 Thread Balaji S
but constructor is A(int *m=0*) { a=m; } not A*(int m*) { a = m; } ??? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from th

[algogeeks] C++ problem..

2011-05-24 Thread Balaji S
Answer pls.. ;-) Class A { int a; public: A(int m = 0) { a = m; } int main() { int i = 0; /* Create the 32 Objects { nObjects[32] } of Class A && Initialize the nObjects[i].a = i during the constructor call ( 0 <= i <= 31 ) */ } -- With Regards, Balaji.S -- You received this message bec

Re: [algogeeks] Re:

2011-05-24 Thread Balaji S
what is n in the while loop? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more opt

Re: [algogeeks] Re: Spoj Problem Help

2011-05-23 Thread Balaji S
@Dave: nice idea.. ll this give AC ? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For m

Re: [algogeeks] [brain teaser ] W Riddle 16 may

2011-05-16 Thread Balaji S
0, ther are no w's in all :P -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more opt

[algogeeks]

2011-05-04 Thread Balaji S
how will u find if the pattern - ww(reverse)s* is in a file in 0(n). w-a string of any length-l w(reverse)- reverse of w s*- any string of any len -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks

Re: [algogeeks] C puzzle

2011-04-08 Thread Balaji S
@pankaj: nice answer...well done..;) -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For m

Re: [algogeeks]

2011-02-24 Thread Balaji S
how to solve it using DP?? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more option

[algogeeks]

2011-02-23 Thread Balaji S
can anyone help?? how to convert a string into a palindrome..with MINIMUM NUMBER OF SUBSTITUTIONS ( operations..) -- balaji ;-) -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroup

Re: [algogeeks] Re: SPOJ PROBLEM

2011-02-18 Thread Balaji S
just output..unicode of infinity.. :) -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For

Re: [algogeeks] Re: question at K10

2011-02-16 Thread Balaji S
a one line solution is needed... -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more

Re: [algogeeks] Re: question at K10

2011-02-15 Thread Balaji S
The solution is.. _AX = 10; can anyone explain?? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googl

[algogeeks] question at K10

2011-02-15 Thread Balaji S
Insert only one line in the function change() so that the output of the program is 10. You are not allowed to use exit(). You are not allowed to edit the function main() or to pass the parameter to change() void change() { // Code here } int main() { int i=5; change(); printf(“%d” ,i); return 0;

Re: [algogeeks] Re: kurukshetra...

2011-02-06 Thread Balaji S
thanks.. -- balaji ;-) -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more opt

[algogeeks] interview quest..

2011-02-05 Thread Balaji S
can anyone help..? Suppose we have a string "RGBBGBGR". we have to eliminate the couple (two same chars adjacent to each other) recursively. For example RGBBGBGR --> RGGBGR-->RBGR -- balaji ;-) -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks"

[algogeeks] kurukshetra...

2011-02-05 Thread Balaji S
can anyone tell how to evaluate max(a,b) using abs() function...?? -- balaji ;-) -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email

Re: [algogeeks]

2011-02-05 Thread Balaji S
well, i can understand how x gets 20...but how y becomes 1??? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr..

Re: [algogeeks] dp

2011-02-04 Thread Balaji S
@Shubam: i ll do the else part rather.. :) and nice reply..;-);p -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubsc

Re: [algogeeks] Re: SPOJ PROBLEM

2011-02-03 Thread Balaji S
i got AC... :) :) :) -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, vis

[algogeeks] dp

2011-02-02 Thread Balaji S
hi all, can you all help to learn dp.. i hav done some basic dp in spoj... -- balaji ;-) -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from th