Pregunta de entrevista de Meta

Graph question but I forgot how to implement bellman ford