Pregunta de entrevista de LRDTech

Some random leetcode question that they probably got online.