Pregunta de entrevista de TikTok

Leetcode question 208 was asked