Second challenge solved from hacker rank.