The sorted solution first sorts both the arrays. If we sort the arrays independently, we would lost the order i.e. the ith element in both the arrays might not refer to the correct arrival and departure of the train. Can someone pls explain why sorting both the arrays independently is correct?
Course: https://www.educative.io/courses/algorithms-coding-interviews-python
Lesson: Solution Review: Find Minimum Platforms Required for a Station - Algorithms for Coding Interviews in Python