Clean Java, O(1)
Well, at least I claim this is clean/readable: :-)\n\n\nclass Solution {\n    public int numberOfRounds(String startTime, String finishTime) {\n        int star
Well, at least I claim this is clean/readable: :-)\n\n```\nclass Solution {\n    public int numberOfRounds(String startTime, String finishTime) {\n        int start = toMinutes(startTime);\n        int end = toMinutes(finishTime);\n        \n        int roundedStart = toNextQuarter(start);\n        int roundedEnd = toPreviousQuarter(end);\n        \n        if (start < end) {\n            return Math.max(0, (roundedEnd - roundedStart) / 15);\n        }\n        \n        return (24 * 60 - roundedStart + roundedEnd) / 15;\n    }\n    \n    public static int toMinutes(String s) {\n        return Integer.parseInt(s.substring(0, 2)) * 60\n            + Integer.parseInt(s.substring(3, 5));\n    }\n    \n    public static int toNextQuarter(int time) {\n        return ((time + 14) / 15) * 15;\n    }\n\n    public static int toPreviousQuarter(int time) {\n        return (time / 15) * 15;\n    }\n}\n```\n
[]