Find the Top Bid

Basic

An auction screen highlights the highest bid received. Given a non-empty list of bids, return the largest.

Implement `solve(List<Integer> nums)` (non-empty) to return the largest value.

Examples

Input[3, 41, 12, 9, 38]
Output41
Input[7]
Output7
Hints
  • Track the largest seen so far while looping.
Anonymous Apex

Your code runs in a secure sandbox against multiple hidden test cases. The problem is solved only when every test passes. Each run is isolated and any data changes are rolled back automatically.