KPMG Technology | Minimum Time Difference | Off Campus Online Assessment Question 2024
Question · Posted Jun 2026
Problem Statement Given a list of time points in 24-hour format ("HH:MM"), find the minimum difference in minutes between any two time points in the list. Since time is circular, the difference between "23:59" and "00:00" is 1 minute. Return the minimum time difference in minutes. Example 1 Input: timePoints = ["23:59","00:00"] Output: 1 Explanation 23:59 = 1439 minutes 00:00 = 0 minutes Difference across midnight: 1440 - 1439 + 0 = 1 Hence, the minimum difference is 1 minute. ...
The full answer & interview discussion are available to premium members.
Log in Create a free account