Skip to main content

Practice · 2 of 3

Biggest Expense

CHALLENGE
Difficulty: beginner+25 XP

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.

Back to lesson: Practice: Decomposition Drill