Back to problems

Design a Dormitory Room-Assignment System

Object-Oriented Programming · Google · Medium

Queue Per Room Type Core Idea The heart of this design is to group rooms by their capacity type and keep the available rooms of each type in a queue. A student who wants a two-person room only looks at the two-person queue; a student who wants a four-person room only looks at the four-person queue. A partially filled room is not removed from its queue immediately. For example, if a four-person room has received only one student, it still has three free beds, so it remains at…

Checking your access…