Simple java Solution
\nclass Solution {\n\tpublic int numberOfRounds(String startTime, String finishTime) {\n\t\tString[] start = startTime.split(":");\n\t\tString[] end = finishTim
```\nclass Solution {\n\tpublic int numberOfRounds(String startTime, String finishTime) {\n\t\tString[] start = startTime.split(":");\n\t\tString[] end = finishTime.split(":");\n\t\tint sHH = Integer.parseInt(start[0]);\n\t\tint sMM = Integer.parseInt(start[1]);\n\n\t\tint eHH = Integer.parseInt(end[0]);\n\t\tint eMM = Integer.parseInt(end[1]);\n\n\t\tif(sHH > eHH || (sHH == eHH) && (sMM > eMM)){\n\t\t\treturn startLessThanFinishTime(sHH, sMM, 24, 0) + startLessThanFinishTime(0, 0, eHH, eMM);\n\t\t}else{\n\t\t\treturn startLessThanFinishTime(sHH, sMM, eHH, eMM);\n\t\t}\n\t}\n\n\tpublic int startLessThanFinishTime(int sHH, int sMM, int eHH, int eMM){\n\t\tif(sHH == eHH){\n\t\t\treturn f(sHH, sMM, eHH, eMM);\n\t\t}else{\n\t\t\treturn f(sHH, sMM, sHH + 1, 60) + f(eHH, 0, eHH + 1, eMM) + (eHH - sHH - 1) * 4;\n\t\t}\n\t}\n\n\tpublic int f(int sHH, int sMM, int eHH, int eMM){\n\t\tsMM = (sMM / 15) * 15 + (sMM % 15 != 0 ? 15 : 0);\n\t\teMM = (eMM / 15) * 15 + (sMM % 15 != 0 ? -15 : 0);\n\t\tif(eMM < sMM) return 0;\n\t\treturn (eMM - sMM) / 15;\n\t}\n}\n```
[]