Generally we will have random set of credits and debits (which can have many to many matchings). We need to find a match such that we are left with minimum possible credit/debit which is unmatched.
On Tue, Jun 7, 2011 at 11:09 PM, vishnu madiga <vishnu.mad...@gmail.com>wrote: > find a combination of credits and debits which will sum out to zero in > a given set of credit and debit values. > It's not necessary to have a one to one match between a debit and > credit. > > For example, the parent may lend $25 and $75 to its subsidiary and > receive back 3 payments of $20, $40 and $40. > The task is to match these entries in an account. This becomes taxing > because multiple debits can be applied to > multiple credits. In many cases there is more than one way to match > the values. > > The goal is to develop a solution which will take a set of credits and > debits and match as many debits to as > many credits as possible. A test case could have up to 2,000 debits > and credits. > > > -- 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 http://groups.google.com/group/algogeeks?hl=en.