Openhouse interview question

Asked for a real time assignment