[algogeeks] SUGGESTIONS

2012-01-01 Thread geek forgeek
Hello Everyone , I have finished all the standard algorithms in the one - semester curriculum of the B-Tech course. I want help on the kind of algorithms i should do now . I get difficulty in doing problems in competitions like on topcoder , codechef etc.So Kindly suggest links or books for the

[algogeeks] Re: SUGGESTIONS

2012-01-01 Thread geek forgeek
anyone ? On Sun, Jan 1, 2012 at 4:05 PM, geek forgeek geekhori...@gmail.com wrote: Hello Everyone , I have finished all the standard algorithms in the one - semester curriculum of the B-Tech course. I want help on the kind of algorithms i should do now . I get difficulty in doing problems

[algogeeks] NUMBER OF MST ?

2011-12-03 Thread geek forgeek
If there are n nodes in a graph connected to each other with edges of same length .Then how many minimum spanning trees are possible ? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

[algogeeks] MS interview:

2011-07-27 Thread geek forgeek
Function to display the directory structure in a user friendly way taking root dir as arg for a general OS. You may assume and state some basic APIs available in that OS -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group,

[algogeeks] Re: MS interview:

2011-07-27 Thread geek forgeek
anyone?? On Tue, Jul 26, 2011 at 11:36 PM, geek forgeek geekhori...@gmail.comwrote: Function to display the directory structure in a user friendly way taking root dir as arg for a general OS. You may assume and state some basic APIs available in that OS -- You received this message

Re: [algogeeks] MS interview:

2011-07-27 Thread geek forgeek
in the File system tree. -- On Wed, Jul 27, 2011 at 12:06 PM, geek forgeek geekhori...@gmail.comwrote: Function to display the directory structure in a user friendly way taking root dir as arg for a general OS. You may assume and state some basic APIs available in that OS -- You

[algogeeks] OUTPUT

2011-07-25 Thread geek forgeek
1. #includestdio.h main() { int i=1; printf(\n%d,i^=1%2); printf(\n%d %d,i^=1%2,i=1%2); return 0; } output 3 3 hey shudnt the output be 3 2 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] OUTPUT

2011-07-25 Thread geek forgeek
ma mistake code is #includestdio.h main() { int i=1; printf(\n%d %d,i^=1%2,i=1%2); return 0; } On Mon, Jul 25, 2011 at 10:19 AM, Deoki Nandan deok...@gmail.com wrote: run on gcc compiler it would be 0 1 1 On Mon, Jul 25, 2011 at 10:35 PM, geek forgeek geekhori...@gmail.comwrote: 1

Re: [algogeeks] OUTPUT

2011-07-25 Thread geek forgeek
. 4TH Year BE.** Information Science Dept* *PESIT, Bengaluru . * On Mon, Jul 25, 2011 at 10:49 PM, Deoki Nandan deok...@gmail.com wrote: run on gcc compiler it would be 0 1 1 On Mon, Jul 25, 2011 at 10:35 PM, geek forgeek geekhori...@gmail.comwrote: 1. #includestdio.h main

[algogeeks] output plzz

2011-07-23 Thread geek forgeek
#includestdio.h main() { int i=3; switch(i) { do { case 3: printf(\nhello); case 2:printf(\n h); break; case 1:printf(wat); break; case 0: printf(hai); }while(i--); }

Re: [algogeeks] output plzz

2011-07-23 Thread geek forgeek
. On Sat, Jul 23, 2011 at 8:47 PM, geek forgeek geekhori...@gmail.comwrote: #includestdio.h main() { int i=3; switch(i) { do { case 3: printf(\nhello); case 2:printf(\n h); break; case 1:printf(wat

[algogeeks] output plzz

2011-07-23 Thread geek forgeek
#includestdio.h main() { char outline[50]; char one[7],two[7],four[7],five[7]; int three; sprintf(outline,this is %d times %s \n,10,charlie); printf(%s,outline); sscanf(outline,%s %s %d %s %s,one,two,three,four,five); printf(%s,one); printf(%s,two);

[algogeeks] explain plzz:output in file old.out

2011-07-22 Thread geek forgeek
#includestdio.h main() { FILE *fp; char a; fp=fopen(old.out,w); if(fp==0) printf(File opening error); else { for(scanf(%c,a);a!=EOF;scanf(%c,a)) fprintf(fp,%c,a); fclose(fp); fp=fopen(old.out,r); while(!feof(fp))

Re: [algogeeks] explain plzz:output in file old.out

2011-07-22 Thread geek forgeek
@shady this is nt a joke.. sorry if i am asking too stupid question i m getting an infinite loop here. not getting how? On Fri, Jul 22, 2011 at 10:40 AM, shady sinv...@gmail.com wrote: what kind of joke is this ? On Fri, Jul 22, 2011 at 11:02 PM, geek forgeek geekhori...@gmail.comwrote

Re: [algogeeks] explain plzz:output in file old.out

2011-07-22 Thread geek forgeek
, 2011 at 11:34 PM, shady sinv...@gmail.com wrote: well you didn't mention the question, directly posted the code with no head-tail... wait will answer, it is not coming out of first loop On Fri, Jul 22, 2011 at 11:26 PM, geek forgeek geekhori...@gmail.comwrote: @shady this is nt a joke

[algogeeks] xplain output

2011-07-22 Thread geek forgeek
#includestdio.h void main() { int x; float t; scanf(%f,t); printf(%f\n,t); x=90; printf(%f\n,x); { x=1; printf(%f\n,x); { x=30; printf(%f\n,x); } printf(%f\n,x); } x==9; printf(%f\n,x);

Re: [algogeeks] Re: C OUTPUT HELP

2011-07-22 Thread geek forgeek
@nicks -- ur code for 1st problem is giving me 1 not -1 on gcc..which compiler are you using On Fri, Jul 22, 2011 at 11:58 AM, sumit sumitispar...@gmail.com wrote: +1 to t3rminal On Jun 12, 11:38 pm, T3rminal piyush@gmail.com wrote: @all Stop guessing and making your own standards. C

Re: [algogeeks] Re: EXPLAIN THE OUTPUTS

2011-07-19 Thread geek forgeek
@schrodinger y a[] value is not lost in first call.it should be lost in first call only? On Tue, Jul 19, 2011 at 8:24 PM, schrodinger 6fae1ce6347...@gmail.comwrote: First output of memory location is fine. Second output is also expected one. Third output will vary compiler to compiler and

[algogeeks] OUTPUT

2011-07-18 Thread geek forgeek
int main() { static int var = 5; printf(%d ,var--); if(var) main(); } y output is 5 4 3 2 1 not 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 y on each recursive call var is not initialized again. -- You received this message because you are subscribed

[algogeeks] MICROSOFT

2011-07-17 Thread geek forgeek
given an array a[0..n-1] .required to find the output array out [0.n-1] such that out [i] is the product of all the numbers a[0] to a[n-1] excluding a[i] for ex out[2]=a[0]*a[1]*a[3]*a[4]a[n-1] constraint is not using division operator how to do this in O(n)?? -- You received

Re: [algogeeks] MICROSOFT

2011-07-17 Thread geek forgeek
things c[n-1]=1; c[i]=c[i+1]*a[i+1] (in-1) fill the c[] array in reverse order i.e. start from n-1 then go to 0; now output[] would be output[i]=b[i]*c[i]; On Sun, Jul 17, 2011 at 4:28 PM, geek forgeek geekhori...@gmail.comwrote: given an array a[0..n-1] .required to find

[algogeeks] c doubt

2011-07-11 Thread geek forgeek
#includestdio.h main(){int a=10,b; a=5?b=10:b=20;printf http://www.opengroup.org/onlinepubs/009695399/functions/printf.html(%d\n,b);} y this is asking for lvalue while this(below) not? #includestdio.h main(){int a=10,b; a=5?b=10:(b=20);printf

[algogeeks] segment tree

2011-07-04 Thread geek forgeek
-- Forwarded message -- From: geek forgeek geekhori...@gmail.com Date: Mon, Jul 4, 2011 at 2:58 PM Subject: segment tree To: algog...@googlegroups.com can any1 plz tell some gud tutorial for segment tree? -- You received this message because you are subscribed to the Google

[algogeeks] Re: segment tree

2011-07-04 Thread geek forgeek
any1 -- 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 this group at

Re: [algogeeks] Re: segment tree

2011-07-04 Thread geek forgeek
=Staticd1=tutorialsd2=lowestCommonAncestor On Jul 4, 5:15 pm, geek forgeek geekhori...@gmail.com wrote: any1 -- 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