Re: [algogeeks] SPOJ

2011-09-06 Thread Akshata Sharma
@rahul, yes i agree with what you said, but I don't think that this is causing WA here.. Its equivalent as if u take 2 1-darrays.. right? On Wed, Sep 7, 2011 at 8:25 AM, rahul vatsa vatsa.ra...@gmail.com wrote: if you are allocating memory for a n-d array, u shouldn't allocate memory for each

[algogeeks] Re: Maximum possible edges in a graph

2011-09-06 Thread Shuaib
Actually it is a bipartite graph. Thus answer equal to floor(n/2)*ceil(n/2). -- Shuaib http://twitter.com/ShuaibKhan http://www.bytehood.com/ On 07-Sep-2011, at 7:30 AM, Shuaib Khan aries.shu...@gmail.com wrote: I don't have a formal proof yet, but can anyone give a counter test case to

Re: [algogeeks] EOF

2011-09-06 Thread Anup Ghatage
You can quite easily map this problem to that of a typical client-server protocol. You don't know the size of the data, and the all packets will be of a certain size, possibly, except the last one. So the solutions provided for that problem might apply to some cases of this! -- Anup Ghatage --

[algogeeks] plz xplain the o/p

2011-09-06 Thread piyush agarwal
#includestdio.hvoid swap(char *, char *); int main() { char *pstr[2] = {Hello, piyush}; swap(pstr[0], pstr[1]); printf(%s\n%s, pstr[0], pstr[1]); return 0; }void swap(char *t1, char *t2) { char *t; t=t1; t1=t2; t2=t; } -- Piyush Agarwal Final Year Undergraduate

<    1   2