Tech Mahindra Interview Question

Technical question