Meta interview question

All of questions were around array, dfs and string