Tech Mahindra interview question

Explain a challenging coding problem