HackerRank solved !