C++  - O(1) Solution
\nclass Solution {\npublic:\n    int numberOfRounds(string s, string f) {\n        int S = stoi(s.substr(0,2))*60 + stoi(s.substr(3));\n        int F = stoi(f.s
```\nclass Solution {\npublic:\n    int numberOfRounds(string s, string f) {\n        int S = stoi(s.substr(0,2))*60 + stoi(s.substr(3));\n        int F = stoi(f.substr(0,2))*60 + stoi(f.substr(3));\n        \n        if(S<F && F-S<15)\n        {\n            return 0;\n        }\n        \n        S = 15*((S+14)/15);\n        F = 15*(F/15);\n        \n        int H;\n        if(S>F)\n        {\n            H=24*60 - S + F;\n        }\n        else\n        {\n            H=F-S;\n        }\n        return H/15;\n    }\n};\n```
[]