TikTok interview question

question on searching algorithm in a list