Question d’entretien chez IBM

Two coding problems on HackerRank. One was easy, one was difficult.