Pergunta de entrevista da empresa Google

Technical round 1, was asked a simple array question, then how to optimise it, code in python, what is a generator, how to use yield to flatten the iterator of an array. Follow up was a deep nested array, how to flatten it, I use DFS, then interviewer ask how to use yield, and generator to solve this question