Morgan Stanley Interview Question

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