Algorithm · Coinbase · Hard
Problem Create a function that chooses transactions for inclusion in a mined block. Every transaction has a distinct id and a fee. The block has a fixed transaction capacity, so the selection should favor the greatest total fee. Your implementation must support both of these cases: Independent transactions: any transaction may be selected without requiring another transaction. Transactions with dependencies: a transaction may list parent transaction IDs in parents. A…
Checking your access…