Tech Mahindra interview question

Full cycle implementation