Pregunta de entrevista de ByteDance

Network related question Leetcode question (easy to medium)