You are given two strings current and correct representing two 24-hour times.

24-hour times are formatted as "HH:MM", where HH is between 00 and 23, and MM is between 00 and 59. The earliest 24-hour time is 00:00, and the latest is 23:59.

In one operation you can increase the time current by 1, 5, 15, or 60 minutes. You can perform this operation any number of times.

Return the minimum number of operations needed to convert current to correct.

&nbsp;
Example 1:

Input: current = "02:30", correct = "04:35"
Output: 3
Explanation:
We can convert current to correct in 3 operations as follows:
- Add 60 minutes to current. current becomes "03:30".
- Add 60 minutes to current. current becomes "04:30".
- Add 5 minutes to current. current becomes "04:35".
It can be proven that it is not possible to convert current to correct in fewer than 3 operations.

Example 2:

Input: current = "11:00", correct = "11:01"
Output: 1
Explanation: We only have to add one minute to current, so the minimum number of operations needed is 1.


&nbsp;
Constraints:


	current and correct are in the format "HH:MM"
	current &lt;= correct


class Solution:
    def HHMMToMinutes(self, s: str) -> int:
        return int(s[0:2])*60 + int(s[3:5])
    def convertTime(self, current: str, correct: str) -> int:
        diff = self.HHMMToMinutes(correct) - self.HHMMToMinutes(current)
        order = [60,15,5,1]
        ops = 0
        for i in range(0,4):
            ops+=int(diff/order[i])
            diff%=order[i]
        return ops
class Solution {
    public int HHMMToMinutes(String s){
        return Integer.parseInt(s.substring(0,2))*60 + Integer.parseInt(s.substring(3,5)) ;
    }
    public int convertTime(String current, String correct) {
        int diff = HHMMToMinutes(correct) - HHMMToMinutes(current);
        int[] order = {60,15,5,1};
        int i = 0;
        int ops = 0;
        while(i < 4){
            ops+=(diff/order[i]);
            diff%=order[i];
            i++;
        }
        return ops;
    }
}
class Solution {
public:
    int HHMMToMinutes(string s){
        return stoi(s.substr(0,2))*60 + stoi(s.substr(3,2));
    }
    int convertTime(string current, string correct) {
        int diff = - HHMMToMinutes(current) +  HHMMToMinutes(correct);
        vector<int> order = {60,15,5,1};
        int i = 0;
        int ans = 0;
        while(i < 4){
            ans+=(diff/order[i]);
            diff%=order[i];
            i++;
        }
        
        return ans;
    }
};
var getTime = function(time){
    var [hrs,mins] = time.split(":");
    return parseInt(hrs)*60 + parseInt(mins);
}


var convertTime = function(current, correct) {
    var diff = getTime(correct) - getTime(current);
    var order = [60,15,5,1];
    var ops = 0;
    order.forEach(val =>{
        ops+=Math.floor((diff/val));
        diff%=val;
    })
    return ops;
};
Minimum Number of Operations to Convert Time