PAYLOCITY OA 2024 | Maximum Employees to Be Invited to a Meeting | Graph and Topological Sort
Question · Posted Jun 2026
Problem Statement A company has n employees numbered from 0 to n-1. Each employee has exactly one favorite colleague represented by: favorite[i] = employee i's favorite person A meeting table is circular. An employee will attend only if they can sit next to their favorite colleague. Find the maximum number of employees that can be invited to the meeting. Example Input favorite = [2,2,1,2] Output 3
The full answer & interview discussion are available to premium members.
Log in Create a free account