Pregunta de entrevista de Jet

Simple algorithms, a bit of functional programming concepts.