[algogeeks] need help??

2012-09-22 Thread Ratan
guys plzz help me wid the java book that i shld start ??? -- -- Ratan | Final Year | Information Technology | NIT ALLAHABAD -- 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

[algogeeks] file handle

2012-08-18 Thread Ratan
changed. how does this happen ... as becauz i am just reversing the file closing handle that has nothing to do with writng to the file as the file has already been written by fputc() function kindly clarify my confusion.. -- -- Ratan | Final Year | Information Technology | NIT ALLAHABAD

[algogeeks] Re: Dynamic Programming Problem SPOJ-AMR11A

2012-07-18 Thread Bharat Kul Ratan
If you need hint: I used DP (Dynamic Programming) to solve this and get AC (Accepted). I stored the matrix as 2-D array and then started with array[R][C]. From there I can go upward and left. In each element of array put the minimum possible value to get the array[R][C]. In case, if we get the

[algogeeks] Finding largest zigzag subsequence

2012-06-08 Thread Ratan
Given a list of integers n, we have to find the length of largest zigazg subsequence in the list i.e,zigzag subsequence is defined as if the first number is increasing then the 2nd one should be decreasing or vice versa.. for eg : if list[n]={1,10,5,9,8,12,20} then, largest zigzag

Re: [algogeeks] Finding largest zigzag subsequence

2012-06-08 Thread Ratan
+919985813081 +919966006652 On Fri, Jun 8, 2012 at 3:47 PM, Ratan success.rata...@gmail.com wrote: Given a list of integers n, we have to find the length of largest zigazg subsequence in the list i.e,zigzag subsequence is defined as  if the first number is increasing then the 2nd one

Re: [algogeeks] Finding largest zigzag subsequence

2012-06-08 Thread Ratan
subsequence is : %d\n,Max);     return 0; } On Fri, Jun 8, 2012 at 5:40 PM, srikanth reddy malipatel srikk...@gmail.com wrote: we should use dp On Fri, Jun 8, 2012 at 5:39 PM, Ratan success.rata...@gmail.com wrote: Thats what the question is about to find the maximum subsequence

[algogeeks] Level Order Traversal vs BFS

2012-04-19 Thread Ratan
Can any1 confirm me wid the differnce between the level order traversal and the BFS if any!!! -- -- Ratan | 3rd Year | Information Technology | NIT ALLAHABAD -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email

[algogeeks] Find the maximum boxes which can fit each other?

2012-03-24 Thread Ratan
into another only and only if all dimensions of that is less than the bigger box. Also Rotation of boxes is not possible... can ny1 suggest a good algo for this? -- -- Ratan | 3rd Year | Information Technology | NIT ALLAHABAD -- You received this message because you are subscribed

Re: [algogeeks] Find the maximum boxes which can fit each other?

2012-03-24 Thread Ratan
@atul can u plzz describe in detail the algo of modified subsequence prob used here i m nt able to get it ... though tried a lot On Sat, Mar 24, 2012 at 1:05 PM, atul anand atul.87fri...@gmail.com wrote: it is modified longest increasing subsequence problem.. On 24 Mar 2012 12:26, Ratan

Re: [algogeeks]

2012-02-13 Thread Ratan
?hl=en. -- -- Ratan | 3rd Year | Information Technology | NIT ALLAHABAD -- 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

Re: [algogeeks]

2012-02-13 Thread Ratan
are adding ONE to i FOUR times hence the answer you get is 4 plus the computation of previous line Hope I AM correct : On Mon, Feb 13, 2012 at 3:56 PM, Ratan success.rata...@gmail.com wrote: can any1 explain the working of the above expression in any of the compiler. I jzz want

Re: [algogeeks]

2012-02-13 Thread Ratan
at 7:38 PM, Ratan success.rata...@gmail.com wrote: Actually i had evaluated x=(++i + ++i); separately with i=2; but i was amazed to get answer as 8... can u elaborate it On Mon, Feb 13, 2012 at 4:09 PM, Rahul raikra...@gmail.com wrote: Here you go then : ++ i becomes 3 second bracket

[algogeeks]

2012-02-12 Thread Ratan
int i=2,x; x=(i++ + i++) * (i++ + ++i); printf(%d,x); o/p: 24 plzzz justify this output... -- -- Ratan | 3rd Year | Information Technology | NIT ALLAHABAD -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email

[algogeeks] output expalnation?

2011-09-26 Thread Ratan
); break; } return 0; } can any1 explain the o/p of this program... Thanxs n Regards -- Ratan Modi -- 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

Re: [algogeeks] output expalnation?

2011-09-26 Thread Ratan
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 http://groups.google.com/group/algogeeks?hl=en. -- Ratan Kumar B. Tech MNNIT, Allahabad

Re: [algogeeks] Re: question

2011-09-22 Thread Ratan
://groups.google.com/group/algogeeks?hl=en. -- Ratan Kumar B. Tech MNNIT, Allahabad -- 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] Re: question

2011-09-22 Thread Ratan
@dheeraj ... ya u r ryt thnxs for the correction On Thu, Sep 22, 2011 at 1:30 PM, Dheeraj Sharma dheerajsharma1...@gmail.com wrote: @Ratan: i think the next largest here would be 784559 On Thu, Sep 22, 2011 at 12:39 PM, Ratan success.rata...@gmail.com wrote: @kartik : to some extent ur

Re: [algogeeks] Re: question

2011-09-22 Thread Ratan
:01 PM, Ratan success.rata...@gmail.com wrote: @dheeraj ... ya u r ryt thnxs for the correction On Thu, Sep 22, 2011 at 1:30 PM, Dheeraj Sharma dheerajsharma1...@gmail.com wrote: @Ratan: i think the next largest here would be 784559 On Thu, Sep 22, 2011 at 12:39 PM, Ratan

Re: [algogeeks] Re: question

2011-09-22 Thread Ratan
);    } }     coutstr;  getch(); } correct me..if m wrong.. On Thu, Sep 22, 2011 at 2:01 PM, Ratan success.rata...@gmail.com wrote: @dheeraj ... ya u r ryt thnxs for the correction On Thu, Sep 22, 2011 at 1:30 PM, Dheeraj Sharma dheerajsharma1...@gmail.com wrote: @Ratan: i think

Re: [algogeeks] Syllogism

2011-08-23 Thread Bharat Kul Ratan
Statement: Some girls are beautiful IMO , this means you a set of all girls and after that comes statement about some otherwise statement would be for all girls. There is something left in the set after statement which is nothing but complement of beautiful i.e. not beautiful so, the conclusion

[algogeeks] Find the value of a(n)

2011-08-16 Thread Bharat Kul Ratan
Sequence *(ai)* of natural numbers is defined as follows: *ai = bi* (for *i = k*) *ai = c1ai-1 + c2ai-2 + ... + ckai-k* (for *i k*) where *bj* and *cj* are given natural numbers for *1=j=k*. We have to compute *an* for given *n* We've been given: *k* - number of elements of *(c)* and

Re: [algogeeks] Number theory

2011-08-16 Thread Bharat Kul Ratan
It might be useful: http://www.artofproblemsolving.com/Wiki/index.php/Partition_%28combinatorics%29 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit

Re: [algogeeks] Find the number of occurences of maximum sum in given array.

2011-08-15 Thread Bharat Kul Ratan
@sukran: I've gone through Kadane's algo but I was looking for the number of times the sum appears especially cases involving zeros. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit