LeetCode 539, Medium. Topics: Array, Math, String, Sorting. View on LeetCode.
Generate this problem as a practice environment: tested reference solution, 15 parametrized pytest cases, and a playground notebook:
Problem
Given a list of 24-hour clock time points in “HH:MM” format, return the minimum minutes difference between any two time-points in the list.
Examples
Constraints
2 <= timePoints.length <= 2 * 10^4
timePoints[i] is in the format “HH:MM”.
Solution
Reference implementation from solution.py on GitHub, full suite in test_solution.py:
Complexity
NeetCode All. Last modified on September 7, 2026