shlogg · Early preview
Md Ariful Haque @mah-shamim

Minimum Time Difference In 24-Hour Clock Times

Convert time points to minutes: 23*60+59=1439, sort them, handle circular clock & find min diff between consecutive time points.

539. Minimum Time Difference
Difficulty: Medium
Topics: Array, Math, String, Sorting
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.
Example 1:

Input: timePoints = ["23:59","00:00"]
Output: 1

Example 2:

Input: timePoints = ["00:00","23:59","00:00"]
Output: 0

Constraints:

2 <= timePoints.length <= 2 * 104
timePoints[i] is in the format "HH:MM".

Solution:
The approach can be broken down as follows:

  
  
  Approach:

Convert time points to minutes:
Each time point is in "HH:MM" format, so we can co...