Calculate transaction fees from CSV records | ByteDance Interview Question