Frequent Words Problem solution updated