Java O(1)
\nclass Solution {\n    public int numberOfRounds(String startTime, String finishTime) {\n        int[] start = getTime(startTime), end = getTime(finishTime);\n
```\nclass Solution {\n    public int numberOfRounds(String startTime, String finishTime) {\n        int[] start = getTime(startTime), end = getTime(finishTime);\n        if(end[0] < start[0] || end[0] == start[0] && end[1] < start[1]) end[0] += 24; // Midnight case\n        return (end[0] * 4 + end[1]/15) - (start[0] * 4 + ((int)Math.ceil((double)start[1]/15)));\n    }\n    private int[] getTime(String t) {\n        return new int[] {(t.charAt(0) - \'0\') * 10 + (t.charAt(1) - \'0\'), (t.charAt(3) - \'0\') * 10 + (t.charAt(4) - \'0\')};\n    }\n}\n```
[]