Question d’entretien chez UBS

Solve a data structure problem and verify the code in github.