Intervals - Interval List Intersections
Given the following code snippet and inputs, what is the output?
A = [[0,2],[5,10],[13,23],[24,25]]
B = [[1,5],[8,12],[15,24],[25,26]]
```python
from typing import List
def intervalIntersection(A: List[List[int]], B: List[List[int]]) -> List[List[int]]:
i, j = 0, 0
result = []
while i < len(A) and j < len(B):
if A[i][1] < B[j][0]:
i += 1
elif B[j][1] < A[i][0]:
j += 1
else:
start = max(A[i][0], B[j][0])
end = min(A[i][1], B[j][1])
result.append([start, end])
if A[i][1] < B[j][1]:
i += 1
else:
j += 1
return result
print(intervalIntersection(A, B))
```
