Pregunta de entrevista de AngelList

Given a problem, implement an algorithm that solves the problem.