Canonical interview question

tech deep on the code