(int start1, int end1, int start2, int end2)
| 51 | } |
| 52 | |
| 53 | public static int getOverlap(int start1, int end1, int start2, int end2) { |
| 54 | return Math.max(0, Math.min(end1, end2) - Math.max(start1, start2)); |
| 55 | } |
| 56 | |
| 57 | public static int getOverlap(Interval i1, Interval i2) { |
| 58 | return getOverlap(i1.start, i1.end, i2.start, i2.end); |
no outgoing calls
no test coverage detected