Skip to main content

Practice ยท 2 of 3

Biggest Expense

Given the Txn model in scope, implement int biggest_idx(const Txn *txs, int n) returning the INDEX of the transaction with the largest cents (ties: lowest index), or -1 for n == 0.

Difficulty: beginner

Back to lesson: Practice: Decomposition Drill