Robots and Pencils interview question

Design patterns