C++ solution
Please, upvote if you like it. Thanks :-)Complexity

Time complexity:
O(1)


Space complexity:
O(1)

Code
Please, upvote if you like it. Thanks :-)

# Complexity
- Time complexity:
O(1)

- Space complexity:
O(1)

# Code
```cpp []
int numberOfRounds(string loginTime, string logoutTime) {
    int loginHrs = stoi(loginTime.substr(0, 2)), loginMnts = stoi(loginTime.substr(3));
    int logoutHrs = stoi(logoutTime.substr(0, 2)), logoutMnts = stoi(logoutTime.substr(3));
    if (logoutTime < loginTime)
        logoutHrs += 24;
    int res = (logoutHrs * 60 + logoutMnts) / 15 - (loginHrs * 60 + loginMnts) / 15 - (loginMnts % 15 > 0);
    return res > 0 ? res : 0;
}
```
['Math', 'String', 'C++']