Infosys interview question

Very logical based questions