Minimum Time Difference Leetcode Solution Python