A company is planning a meeting and has favorite of length favorite[i] denotes the favorite employee of employee i.
An employee will attend the meeting if and only if they can sit directly adjacent to their favorite person at the round table. The round table can seat any number of employees.
Return the maximum number of employees that can be invited to the meeting.
Constraints:
n favorite.length
n
favorite[i] n
favorite[i] i
A company is planning a meeting and has favorite of length favorite[i] denotes the favorite employee of employee i.
An employee will attend the meeting if and only if they can sit directly adjacent to their favorite person at the round table. The round table can seat any number of employees.
Return the maximum number of employees that can be invited to the meeting.
Constraints:
n favorite.length
n
favorite[i] n
favorite[i] i