HackerRank Day 3: Arrays problem solution - TheCScience