[algogeeks] Re: [Amazon]

2012-07-26 Thread ankush sharma
Hi, I think the following approach will work. 1. As the array is sorted in all three directions, assume the 3D array to be a stack of rectangular arrays or 2D arrays. Searching in a 2D array of size M*N is trivial - time complexity O(m + n). Provided that the 2D array is sorted, both row

[algogeeks] Google Question Invoice -bills

2012-03-26 Thread Ankush Bagotra
There are 210 Invoices and 1700 bills – these bills add up to these invoices The association between bills and invoices is lost . The only way to match them is by adding them up to correct amounts that are equal to the invoices. For Example : there were 2 invoices for 80, 210 and you have

Re: [algogeeks] Google Question Invoice -bills

2012-03-26 Thread Ankush Bagotra
will solve this problem , you need to run algo for each invoice to find all combination F(n,k) = F(n,k-1) or F(n - a[k], k-1) base case :F(0,k)=1 for k=0     F(n,0)= 0 for n0. On Mon, Mar 26, 2012 at 1:34 PM, Ankush Bagotra ankush.bago...@gmail.com wrote: There are 210

Re: [algogeeks] Google Question Invoice -bills

2012-03-26 Thread ankush . bagotra
210 , check if it is possible if yes , we got one solution not select another invoice combination 80= 50 + 10 + 20 now dont consider these values while find combination for 210. i guess there can be better way to solve this.. On Mon, Mar 26, 2012 at 2:36 PM, Ankush Bagotra ankush.bago

[algogeeks] Re:

2011-09-06 Thread ankush garg
better contact AKSHAY CHADHA .. the person is quite good at c and algos currently placed in MICROSOFT.. akshay.chadha...@gmail.com 9899466888 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

[algogeeks] plz explain output

2010-10-09 Thread ankush
#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(%d\n,x);