YuMe interview question

Algorithm