There is a hotel with n rooms. You are given a rooms where rooms[i] = [] represents a room with an identifier
You are also given a queries of length k, where queries[j] = [].
For each query j, you need to find a room with identifier
The size of the room is at least
The absolute difference between
If there is a tie, choose the room with the smallest
Return an array answer of length k containing the result for each query.
Constraints:
n rooms.length
n
k queries.length
k
There is a hotel with n rooms. You are given a rooms where rooms[i] = [] represents a room with an identifier
You are also given a queries of length k, where queries[j] = [].
For each query j, you need to find a room with identifier
The size of the room is at least
The absolute difference between
If there is a tie, choose the room with the smallest
Return an array answer of length k containing the result for each query.
Constraints:
n rooms.length
n
k queries.length
k