Re: [algogeeks] spoj-party problem

2010-10-13 Thread Devendra Pratap Singh
is message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com > . > For more options, visit

[algogeeks] Re: Boxes!!!

2010-07-21 Thread Devendra Pratap Singh
@siddarth can u explain ur algo for box1 LBH - 7 8 9 box2 LBH - 6 7 8 box3 LBH - 3 7 2 -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send ema

Re: [algogeeks] Re: Sort

2010-07-13 Thread devendra pratap singh
ttp://groups.google.com/group/algogeeks?hl=en. > -- Devendra Pratap Singh B.Tech (IT) IIIT - Allahabad -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscrib

[algogeeks] Re: Sort

2010-07-13 Thread Devendra Pratap Singh
@gene thanx for the working code but can u explain its working more clearly On Jul 13, 11:21 pm, Gene wrote: > On Jul 10, 5:18 pm, Gene wrote: > > > On Jul 9, 3:55 pm, Devendra Pratap Singh > > wrote: > > > > plz write a code to > > > > So

Re: [algogeeks] recursive

2010-07-11 Thread devendra pratap singh
this group, send email to > algogeeks+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Devendra Pratap Singh B.Tech (IT) IIIT - Allahabad -- You received this message because you are subscribed to the Google

[algogeeks] Re: Sort

2010-07-10 Thread Devendra Pratap Singh
@jalaj no constraint but can u tell me how u handle this O(n^2) space when n is around 10^5 -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, sen

[algogeeks] Re: amazon:-

2010-07-09 Thread Devendra Pratap Singh
@Jalaj how using dijikshtra?? can u explain lilbit ... ??? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...

[algogeeks] Sort

2010-07-09 Thread Devendra Pratap Singh
plz write a code to Sort n integer in the range 1 to n^2 in O(n) -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsub

[algogeeks] Re: HIEGHT

2010-07-08 Thread Devendra Pratap Singh
@anand its not a iterative approach -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For m

[algogeeks] Re: Plz help with multidimensional array

2010-07-08 Thread Devendra Pratap Singh
u can access arr[0],arr[1],arr[2] in following way ... #include int main() { char name[3][10] = {"jan","feb","march"}; char (*p)[10] = name; int i; for(i=0;i<=3;i++){ printf("%s\n",p); p = p+1; } return 0; } --

[algogeeks] Re: graphs again

2010-07-05 Thread Devendra Pratap Singh
@ashish how using trasistivity matrix .. will u prepare matrix for each value of k or something else ... ?? On Jul 5, 8:52 am, Ashish Goel wrote: > i would prepare the transitivity matrix while inserting the edge into the > matrix > > the search then would be a O(1) > > Best Regards > Ashish Go

[algogeeks] Re: o/p

2010-06-05 Thread Devendra Pratap Singh
reason for that o/p is ... coz range of short int is -32768 to 32767 and value of i start with i=0 and each time it will increment by 1 so corresponding value of i will be 1 2 3 . . . 32766 32767 -32768 -32767 . . . . -2 -1 but coz in printf u r using %u so it will print... 1 2 3 . . . 3

[algogeeks] Re: frequency

2010-05-17 Thread Devendra Pratap Singh
@Jalaj if u consider only Space complexity then it can be done in O(n^2) time and constant space here i assume string u taken only hv a-z character nothing else try this for(i=0;i='a' && st[i]<='z') ) continue; count=1; for(j=i+1;j wrote: > Hi Friends > > Ha

[algogeeks] Re: partion of array

2010-05-17 Thread Devendra Pratap Singh
Try this .. i think it will work.. correct me if wrong sort(&x[0],&x[n]); ysum=y[0]=x[n-1]; ysum=z[0]=x[n-2]; j=0; k=n-3; l=n/2; for(i=1;i wrote: > my algo on the array 1 200 500 2000 > sort the array therefore we have now 2000 500 200 1