Google interview question

On the second technical interview, they've asked to optimize the answer?