We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66bf4b2 commit 13335bcCopy full SHA for 13335bc
src/main/java/com/fishercoder/solutions/_729.java
@@ -40,8 +40,8 @@ public class MyCalendar {
40
}
41
42
public boolean book(int start, int end) {
43
- for (int i = 0; i < calendar.size(); i++) {
44
- if (calendar.get(i)[0] < end && start < calendar.get(i)[1]) {
+ for (int[] event : calendar) {
+ if (event[0] < end && start < event[1]) {
45
return false;
46
47
0 commit comments