Allocate Cabs

I came across this question in an online assesment.
Given an array similar to the one below :
[[9.0,10.0],[12.20,13.0],[20.08,22.20],[12.40,14.0],[16.20,18.0],[18.0,21.0]]
where each of the inner arrays represents Journey commencement time and end time of each person and there will be N such persons.
[9.0,10.0] means journey starts at 09:00 hours and ends by 10:00 hrs (for person 1)

Our goal is to find the minimum no. of cabs needed to complete all given journeys .
A cab can be allocated if it's not allocated to another journey at that given point of time.

I believe this is a modification of https://leetcode.com/problems/non-overlapping-intervals/ .

Comments (1)