HackerRank Variable Sized Arrays in C++ problem solution - TheCScience