Day 2 Hackerrank Solution