Google interview question

2 easy leetcode questions about string and array