At a party,
For example, if chairs
When a friend leaves, their chair becomes immediately available. If another friend arrives simultaneously, they can take that chair.
You are given a times, where times[i]
Given an integer target_friend, return the chair number that target_friend will sit on.
Constraints:
times.length
times[i].length
arrivali < leavingi
target_friend
Each arrivali time is unique.
At a party,
For example, if chairs
When a friend leaves, their chair becomes immediately available. If another friend arrives simultaneously, they can take that chair.
You are given a times, where times[i]
Given an integer target_friend, return the chair number that target_friend will sit on.
Constraints:
times.length
times[i].length
arrivali < leavingi
target_friend
Each arrivali time is unique.