TikTok Interview Question

question on searching algorithm in a list