Meetup Schedule π
Learn this problemProblem statement
A start-up owner is looking to meet new investors to get some funds for his company. Each investor has a tight schedule that the owner has to respect. Given the schedules of the days investors are available, determine how many meetings the owner can schedule. Note that the owner can only have one meeting per day.
The schedules consists of two integer arrays, firstDay and lastDay. Each element in the array firstDay represents the first day an investor is available, and each element in lastDay represents the last day an investor is available, both inclusive.
Function
maxMeetings(firstDay: int[], lastDay: int[]) β int
Complete the function maxMeetings in the editor.
maxMeetings has the following parameters:
int[] firstDay: an array of integers representing the first day investors are availableint[] lastDay: an array of integers representing the last day investors are available
Returns
int: the maximum number of meetings that can be scheduled
Examples
Example 1
firstDay = [1, 2, 3, 3, 3]lastDay = [2, 3, 4, 4, 4]return = 4Constraints
Unkown for now. Will be sure to add once find them