Tech Mahindra interview question

Puzzles and technical questions