This is a simple app for balancing a group budget. It's destined to put on the app store or anything; it's rather a playgroud for trying out React Native.
- Calculate the total spending person
- Calculate the average total spending
- Calculate the difference between each person's total spending and the average total spending
- While the differences are different than 0
- Find the person who has paid the most (the receiver)
- Find the person who has paid the least (the giver)
- Update each the receiver and the giver's differences with the lowest difference
Eventually the differences will all become 0 (there must be some proof out there). Here is the implementation in Python.