RBC interview question

preferences