Infineon Technologies Interview Question

Asked me to solve a coding problem in technical interview