Intervals - Minimum Number of Platforms Required
Review the following Python code snippet for calculating minimum platforms. Identify the logical error:
```python
def min_platforms(arrivals, departures):
arrivals.sort()
departures.sort()
i = j = 0
platforms = max_platforms = 0
while i < len(arrivals) and j < len(departures):
if arrivals[i] <= departures[j]:
platforms += 1
i += 1
else:
platforms -= 1
j += 1
max_platforms = max(max_platforms, platforms)
return max_platforms
```
