Question d’entretien chez Google

One medium-easy hacker-rank question and one medium-hard question