A naive approach would loop through added transactions for each new transaction by that ends up being O(N^2), which matters if we have many transactions. If we have, we keep this potential transfer for a second phase. To do that, we insert transactions one by one into a list, making sure we have not already inserted one that has the same date, and the same absolute amount. The fix is to only split the transactions if we identify a potential transfer, currently based on amount, date and accounts.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |