Frns,
Any more tries / suggestions?
On Tue, Jun 7, 2011 at 11:26 PM, vishnu madiga wrote:
> Good suggestion Navneet.. I had a similar solution but am looking for
> something more faster.
> Performance is a major consideration to me. The possible permutations for a
> large set of debits and cred
Good suggestion Navneet.. I had a similar solution but am looking for
something more faster.
Performance is a major consideration to me. The possible permutations for a
large set of debits and credits could be massive. The solution should be
intelligent enough to discard non-possible branches quic
Well, one approach is have all possible sums stored for debits and
credits and match the sums.
Basically, you can create a multi-list type DS (if i remember the name
correctly) and store the SUMS and with formative elements in linked
lists being pointer by node containing sums
SUM 1 -> Header 1 -
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.
T