Maximize Transaction Fees Within Size Constraint
Given a list of transactions, each with an ID, fee, and size, implement a function that returns a subset of transactions that maximizes total fees while keeping the sum of all transaction sizes at or below 100.
Asked at:
Coinbase
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Early August, 2026
Coinbase
Staff
Implement a function that takes in a list of transactions. Each transaction has an ID, a fee, and a size associated with it. The list can be huge. The goal of the function is to return a list of transactions by maximizing the fees, but the sum of the sizes of all those transactions should not exceed 100.
Hello Interview Premium
Your account is free and you can post anonymously if you choose.