Pregunta de entrevista de Axial

How would you design an algorithm that determines