Given a list of 24-hour clock time points in <strong>&quot;HH:MM&quot;</strong> format, return <em>the minimum <b>minutes</b> difference between any two time-points in the list</em>.
<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<pre><strong>Input:</strong> timePoints = ["23:59","00:00"]
<strong>Output:</strong> 1
</pre><p><strong class="example">Example 2:</strong></p>
<pre><strong>Input:</strong> timePoints = ["00:00","23:59","00:00"]
<strong>Output:</strong> 0
</pre>
<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>2 &lt;= timePoints.length &lt;= 2 * 10<sup>4</sup></code></li>
	<li><code>timePoints[i]</code> is in the format <strong>&quot;HH:MM&quot;</strong>.</li>
</ul>

class Solution:
    def findMinDifference(self, timePoints: List[str]) -> int:
        # Collect all the times in an array that contains a 
        # count for each possible minute of the day.  There 
        # are 24*60==1440 minutes per day.  The count is the 
        # number of times each minute in the day appears in 
        # the passed timePoints list.  If any time appears 
        # more than once in the list, then the answer will 
        # be zero, because can't have less than the zero 
        # minutes between two points with the same time.  
        # Put an extra value of -1 at the end of the array 
        # to indicate "end-of-array".
        times = [int(tp[:2]) * 60 + int(tp[3:]) for tp in timePoints]
        timesUsed = [0]*(24 * 60) + [-1]
        for t in times:  timesUsed[t] += 1
        if max(timesUsed) > 1:  return 0
        
        # Find the first (lowest time value) time from the 
        # list.  Save the first time for later so it can be 
        # used to do a wrap-around calculation of the distance 
        # between the first and last time.
        idx = 0
        while timesUsed[idx] == 0:  idx += 1
        first = idx
        
        # Find times in the array of timesUsed for all possible 
        # minutes in the day.  Deternmine the minimum distance 
        # between those used times.  The array is terminated by 
        # a -1.  Other values in the array are: 0==>Time not used,
        # 1==>Time used once.  At the end of the array, return 
        # the minimum of the accumulated minimum minutes, and the 
        # wrap-around calculated time distance between the first 
        # and last time values.
        minMin = 24 * 60
        prev = idx
        while True:
            idx += 1
            while timesUsed[idx] == 0:  idx += 1
            if timesUsed[idx] < 0:
                return min(minMin, first + 24*60 - prev)
            minMin = min(minMin, idx - prev)
            if minMin == 1:  return 1
            prev = idx

19400