Deloitte Interview Question

they asked me a puzzle, and one coding question