This is a verified interview question from Hackerrank. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Maximum Team Size" covers key patterns like Other.
"Given n employees, the time when the ith employee starts working is represented by the array startTime[] and the time when they finish the work is represented by the array endTime[]. The ith employee can interact with the jth employee if their working hours overlap. A team can only be formed if at least one employee of the team can interact with all other team members. Determine the maximum size of such a team. ### Problem ### Input - startTime: an array of start times for each employee - endTime: an array of end times for each employee ### Output - The maximum possible team size ### Example 1: - Input: n = 5, startTime = [1, 6, 4, 3, 1], endTime = [2, 7, 5, 8, 2] - Output: 4 ### Example 2: - Input: n = 4, startTime = [2, 5, 6, 8], endTime = [5, 6, 10, 9] - Output: 3"
Join thousands of developers practicing for Hackerrank.