Baidu interview question

Nothing too difficult