Skip to content

hgoel7/Meetup-Schedule

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Question: 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.

STDIN Function


5 firstDay[] size n = 5 1 → firstDay = [1, 2, 1, 2, 2] 2 1 2 2 5 → lastDay[] size n = 5 3 → lastDay = [3, 2, 1, 3, 3]

Sample Output : 3

Another Sample Data: firstDayCount = 5 firstDay = [1,2,1,2,2] lastDayCount = 5 lastDay = [1,2,3,5,3]

Result : 4

About

Some of the problems I came across, and these are the solutions that I have to have written trying to solve maximum related test cases.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages