Question d’entretien chez JPMorganChase

Coding question on hacker rank, probably Leetcode easy to medium