TikTok Interview Question

How to use hash map to build a Pac-Man game.