Pregunta de entrevista de Microsoft

Design an algorithm for creating a puzzle.