Given n meeting rooms , design a BOOK api
Anonymous User
137

BOOK returns the smallest meeting room number if possible, otherwise -1.

One approach is to solve it like calendar I, checking availability of every room in order, return the first one if found and -1 otherwise.

Is there a better approach?

Comments (1)