Wipro interview question

RELATED TO ASCAI and theory