Infrrd Interview Question

one simple coding question