Deloitte interview question

they asked me a puzzle, and one coding question