Tech Mahindra Interview Question

Nothing difficult as such.