Pregunta de entrevista de Bloomberg

how would you implement BFS