Solution to Hacking Google Interview Practice Question series in C++.