HackerRank Day 25: Running Time and Complexity problem solution - TheCScience