← back to unit
Easy
# searching easy
The Fastest Lap Time
Go-kart championship! ⏱️ Lower time = faster lap.
You get a list of lap times in seconds (at least one). Find the smallest one and save it in best.
Example:
Input: times = [58, 52, 61, 49, 55]
Output: 49
Starting with best = 58, we look for anything SMALLER — 52 beats it, then 49 beats that. Nothing after is smaller, so 49 wins.
💡 need a hint?
srch-fastest-lap.py🔒 given lines are locked — write your code in between
loading...