Tap here to switch tabs
Problem
Submissions

Problem: Minimum Number of Operations to Convert Time

med
30 min
Try to solve the Minimum Number of Operations to Convert Time problem.

Statement

You are given two strings current and correct representing two timestamps in a 2424 hour format "HH:MM".

In a single operation, you can increase current by 11, 55, 1515, or 6060 minutes. You may apply this operation any number of times.

Return the minimum number of operations required to transform current into correct.

Constraints:

  • current and correct are in the format "HH:MM"

  • current ≤\leq correct

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Minimum Number of Operations to Convert Time

med
30 min
Try to solve the Minimum Number of Operations to Convert Time problem.

Statement

You are given two strings current and correct representing two timestamps in a 2424 hour format "HH:MM".

In a single operation, you can increase current by 11, 55, 1515, or 6060 minutes. You may apply this operation any number of times.

Return the minimum number of operations required to transform current into correct.

Constraints:

  • current and correct are in the format "HH:MM"

  • current ≤\leq correct