Tetrion Capital interview question

Two string processing questions with a algorithm questions