Morgan Stanley interview question

Asked a leet code easy string manipulation question. Also asked about optimizing computing tasks