Question d’entretien chez JPMorganChase

Typicall SD question and as standard coding problem.