Intel Corporation interview question

Coding some puzzles and behavioral round was unexpected