Wipro interview question

Technical Round was a little difficult