|
6 | 6 |
|
7 | 7 | public class ClosestRoom {
|
8 | 8 |
|
9 | | - // We sort queries by the decreasing of its minSize order. |
10 | | - // We sort rooms by the decreasing of its size order. |
11 | | - // We initialize roomIdsSoFar TreeSet, |
12 | | - // this includes all room ids which have size >=minSize of current query so far. |
| 9 | + // sort queries by the decreasing of its minSize order. |
| 10 | + // sort rooms by the decreasing of its size order. |
| 11 | + // roomIdsSoFar treeSet includes all room ids which have size >=minSize of current query so far. |
13 | 12 | // For each query:
|
14 | 13 | // - Add all room ids which have size >=minSize of current query.
|
15 | 14 | // - Query floor and ceiling of q[0] (preferredId) from roomIdsSoFar
|
|
0 commit comments