Today I finished application logic coding and it seems that all works ok 😉 (or at least my unit test says that). Currently application can compute and simplify complicated loans relation and returns a result with minimal payback operations. Because a picture is better than thousand words, there are few examples:
On beginning, a simple example when Alice lends $10 John, and John lends $10 Bob. Instead of complicated payback from one person to another, there is a simply equal solution, where Bob will payback $10 directly to Alice:
Now little bit complicated example:
As you can see, after this optimization you save three steps.
And finally even more complex example:
Alice lends $100 John, John lends $50 Bob, Bob lends $20 Alice and Jane lends $10 Bob. Do you know how to payback money simply without duplicate the transfers? ;-).
And this is all for now. Application can handle also multiple loans to more people. I will try to prepare another examples of what application can do ;-).
Leave a Reply