Mining Block - Fee-Maximizing Transactions

Asked at Coinbase · Coding Questions · Difficulty: Medium · Last asked May 5, 2026

A blockchain-flavored knapsack. A block has a maximum total `size` (weight budget); each `Transaction` has `.id`, `.size`, `.fee`. Select transactions to maximize total fee.

Loading the problem…