PSG Konsult Interview Question

Asked me about a problem I have solved