Substring Matching Smart Interviews Solution