HackerRank Day 7: Arrays problem solution - TheCScience