TikTok Interview Question

Easy problem solving question( two sum)