Square的面试都是在iMac上pair programming,一般要求自己写class,method,还有测试。
-
Assign students to classes/teachers in a school as evenly as possible.
Followup: teachers have preferences on students and classes can be full. How to assign. Some students can be left unassigned if all classes are full. -
Restaurant loyalty program: three levels (bronze, silver, gold). Customers start at bronze level and can upgrade to silver and gold. Silver needs 2 visits, gold need 3+ visits. Customers can be friends. If one customer upgrades from silver -> gold, his/her friends need to be upgraded by 1 level.
Follow-up: how to make the program flexible to add new levels without having to change existing customers. -
design a hotel [booking] system support booking, room searching, etc.