Infineon Technologies Interview Question

DSA based question was asked