HackerRank Vector-Erase in C++ problem solution - TheCScience