Pregunta de entrevista de idealo internet

Difficulty of some algorithms I coded