TikTok interview question

1. Two sum 2. Puzzle 9 (algo)