HackerEarth Smallest chosen word problem solution - TheCScience