Question d’entretien chez Infosys

Java coding question (easy to medium)