Hacker News new | ask | show | jobs
by emodendroket 3748 days ago
Sure they do. "Model a parking garage in code" or "design a database with customers, orders, etc" are classic interview questions.
1 comments

What is expected from something like "model a parking garage in code?"

Something like a garage class that has properties like numberOfCars, maxAmountofCars, maxHeight and methods for insertCar(), removeCar(), isGarageFull() ?

Probably that and, I don't know, maybe modeling a Car class and various subtypes that inherit from it?
Probably keeping track of how many parking spots are available as cars enter/exit, and denying entrance if you're full up.