Earliest Finish Time for Land and Water Rides I

Solution Code
Video GuideLeetcode Daily

Time Complexity

O(n + m)

Space Complexity

O(1)