Infovision, Inc. interview question

string related code