Practice The Number of Full Rounds You Have Played
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
You are participating in an online chess tournament. There is a chess round that starts every 15 minutes. The first round of the day starts at 00:00, and after every 15 minutes, a new round starts. You are given two strings loginTime and logoutTime where: If logoutTime is earlier than loginTime, this means you have played from loginTime to midnight and from midnight to logoutTime. Return the number of full chess rounds you have played in the tournament. Note: All the given times follow the 24-hour clock. That means the first round of the day starts at 00:00 and the last round of the day starts at 23:45.
Source: The Number of Full Rounds You Have Played on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
loginTime = "09:31", logoutTime = "10:14"
1
# Example 2
loginTime = "21:30", logoutTime = "03:00"
22
Constraints
Related LeetCode Problems
Practice more problems similar to The Number of Full Rounds You Have Played.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.