Re: [algogeeks] puzzle-plz explain stepwise

2011-07-13 Thread udit sharma
Ans should be 45km/hr. :) -- Regards UDIT DU- MCA -- 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

Re: [algogeeks] puzzle

2011-07-10 Thread udit sharma
6,24,60,120,210,336.. (N^3 - N) where N=2,3,4 -- Regards UDIT DU- MCA -- 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

Re: [algogeeks] solve this

2011-07-06 Thread udit sharma
93747.. -- Regards UDIT DU- MCA -- 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: Some adobe interview questions.

2011-07-05 Thread udit sharma
Q-8: 50,25,10,10,10,10 Q2-: Let A,B,C and D are the persons suct tat A takes 1min, B-2, C-5 and D-10 * A and B go across 2 minutes A goes back with light 1 minute C and D go across 10 minutes B goes back with light 2 minute A and

Re: [algogeeks] Re: Number of Comparisons!

2011-07-03 Thread udit sharma
Its Ceiling of (n/2) In both cases atmost comparisons will be 3 * Ceiling of (n/2)... -- 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

Re: [algogeeks] Number of Comparisons!

2011-07-02 Thread udit sharma
If n is odd, then we perform 3*n/2 comparisons. If n is even, we perform 1 + 3*(n-2)/2 -- Regards UDIT DU- MCA -- 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

Re: [algogeeks] query

2011-06-29 Thread udit sharma
@Vaibhav: Sunny is also right bcz if u jst copy n paste d above code with (/ *jp) it'll show an error... And the error is in printf statement. jst cut it from the program n thn write it again.. It'll wrk properly -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] Re: c query

2011-06-28 Thread udit sharma
I think this is also a compiler dependent program.. Bcz if u run d code #includestdio.h typedef struct { char *name; double salary; }job; main() { static job a={tcs,15000.0}; static job a={ibm,25000.0}; static job a={google,35000.0}; int x=5; job *arr[3]={a,b,c};

Re: [algogeeks] novel written test

2011-06-27 Thread udit sharma
Since the product of their ages is 36. So the possible combination of ages may b: either 1 4 9 or 4 3 3 6 6 1 1 2 18 1 3 12 1 1 36 2 2 9 Now neighbor's door numbr gives the sum.. Here all gives uniq sum except (sum=13) So there will be doubt in either 6 6 1 or 2 2 9 Bt as mathematician said tat

Re: [algogeeks] Re: puzzle

2011-06-26 Thread udit sharma
@Harshit: Check dave's solution... U'll get ur ans :) -- 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] Explain this.....

2011-06-22 Thread udit sharma
#includestdio.h int main() { void print(int *,int *,int *,int *,int *); static int arr[]={97,98,99,100,101,102,103,104}; int *ptr=arr+1; print(++ptr,ptr--,ptr,ptr++,++ptr); return 0; } void print(int *a,int *b,int *c,int *d,int *e) { printf(%d\t%d\t%d\t%d\t%d\n,*a,*b,*c,*d,*e); } Why the output

Re: [algogeeks] Re: Explain this.....

2011-06-22 Thread udit sharma
May be it is compiler dependent.. :) -- 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

[algogeeks] String Swapping Problem

2011-06-16 Thread udit sharma
#includestdio.hvoid swap(char *,char *);int main(){char *ps[2]={ Hello, Good Mornning, };swap(ps[0],ps[1]);printf(%s \t %s\n,ps[0],ps[1]);return 0;} void swap(char *p,char *q){char *t;t=p;p=q;q=t;} why the output is: HelloGood Mornning --

Re: [algogeeks] String Swapping Problem

2011-06-16 Thread udit sharma
Ohh Sry... The qus was: #includestdio.hvoid swap(char *,char *);int main(){char *ps[2]={ Hello, Good Mornning, };swap(ps[0],ps[1]);printf(%s \t %s\n,ps[0],ps[1]);return 0;} void swap(char *p,char *q){char *t;t=p;p=q;q=t;} why the output is: Hello

Re: [algogeeks] help

2011-06-13 Thread udit sharma
Bt y k=0, in 2nd code??? -- 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] help

2011-06-13 Thread udit sharma
@Sunny: Thn y k=1 in 2nd code??? -- 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] help

2011-06-13 Thread udit sharma
hmm. Sry yr... Got it.. Thanx.. :) :) -- 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