Infrrd interview question

one simple coding question