XYZ interview question

Aptitude Technical Round