Pregunta de entrevista de Yandex

Some problems from leetcode with different difficulties