Trade Ledger interview question

Question about tech test implementation