leetle

Daily challenge for 2026-11-15

684. Fuel Log Odometer Verification

A fleet vehicle logs its odometer readings across various refueling stops in an array of non-negative integers readings.

Due to potential faulty sensor logs, you must verify the legitimacy of the trip log. An odometer log is considered valid if the recorded readings are strictly increasing (each consecutive reading is greater than the previous one) and every individual distance increment between consecutive readings is at least min_step and at most max_step miles.

Return True if the reading list is valid, and False otherwise. If the list has fewer than two readings, return True as no transitions need to be verified.

Assumptions and Constraints:
- readings contains between 0 and 1000 integers.
- Each reading satisfies 0 <= readings[i] <= 10^9.
- 1 <= min_step <= max_step <= 10^6.

Example:
Input: readings = [100, 150, 220], min_step = 40, max_step = 80
Output: true

Run this challenge interactively in Python or JavaScript when the app loads.