JPMorganChase interview question

Coding exercice hackerrank + hirevue