Meta interview question

a easy level leet code string algorithm problem.