Practice · 5 of 5
Object list + sentinel + min
CHALLENGE
Difficulty: intermediate+25 XP
Implement double bestPrice(ArrayList<Sale> sales, String item): smallest cents among that item's sales as a double, −1.0 when absent. Three machines: object for-each with a filter, a seeded min, and a sentinel for absence.
Press Submit to check your solution.
Back to lesson: Practice: Mixed clinic