TikTok Interview Question

leetcode question (two sum) oop