Solved Substring with concatenation of all words problem