Pregunta de entrevista de VK

Some questions about complexity of algorithms, 3 problems in Python